From 956a2dda293a653cbfbcd03911fb6039faf1e976 Mon Sep 17 00:00:00 2001 From: Heath Stewart Date: Mon, 24 Jul 2023 02:44:08 -0700 Subject: [PATCH] Remove deprecated Web Sites SDK (#37680) Relates to #37660 --- .../AzSdk.RP.props | 7 - .../Microsoft.Azure.Management.Websites.sln | 40 - .../AppServiceCertificateOrdersOperations.cs | 4787 - ...ceCertificateOrdersOperationsExtensions.cs | 1229 - .../AppServiceEnvironmentsOperations.cs | 13650 --- ...ServiceEnvironmentsOperationsExtensions.cs | 3660 - .../Generated/AppServicePlansOperations.cs | 6996 -- .../AppServicePlansOperationsExtensions.cs | 1778 - .../CertificateOrdersDiagnosticsOperations.cs | 687 - ...teOrdersDiagnosticsOperationsExtensions.cs | 189 - ...rtificateRegistrationProviderOperations.cs | 400 - ...egistrationProviderOperationsExtensions.cs | 107 - .../src/Generated/CertificatesOperations.cs | 1628 - .../CertificatesOperationsExtensions.cs | 380 - .../src/Generated/ContainerAppsOperations.cs | 1632 - .../ContainerAppsOperationsExtensions.cs | 415 - .../ContainerAppsRevisionsOperations.cs | 1225 - ...tainerAppsRevisionsOperationsExtensions.cs | 274 - .../src/Generated/DeletedWebAppsOperations.cs | 949 - .../DeletedWebAppsOperationsExtensions.cs | 221 - .../src/Generated/DiagnosticsOperations.cs | 6723 -- .../DiagnosticsOperationsExtensions.cs | 1733 - .../DomainRegistrationProviderOperations.cs | 400 - ...egistrationProviderOperationsExtensions.cs | 107 - .../src/Generated/DomainsOperations.cs | 4092 - .../Generated/DomainsOperationsExtensions.cs | 984 - .../src/Generated/GlobalModelOperations.cs | 597 - .../GlobalModelOperationsExtensions.cs | 150 - .../IAppServiceCertificateOrdersOperations.cs | 750 - .../IAppServiceEnvironmentsOperations.cs | 2250 - .../Generated/IAppServicePlansOperations.cs | 1071 - ...ICertificateOrdersDiagnosticsOperations.cs | 126 - ...rtificateRegistrationProviderOperations.cs | 78 - .../src/Generated/ICertificatesOperations.cs | 243 - .../src/Generated/IContainerAppsOperations.cs | 269 - .../IContainerAppsRevisionsOperations.cs | 177 - .../Generated/IDeletedWebAppsOperations.cs | 150 - .../src/Generated/IDiagnosticsOperations.cs | 1036 - .../IDomainRegistrationProviderOperations.cs | 78 - .../src/Generated/IDomainsOperations.cs | 607 - .../src/Generated/IGlobalModelOperations.cs | 103 - .../Generated/IKubeEnvironmentsOperations.cs | 297 - .../src/Generated/IProviderOperations.cs | 398 - .../Generated/IRecommendationsOperations.cs | 635 - .../IResourceHealthMetadataOperations.cs | 312 - .../src/Generated/IStaticSitesOperations.cs | 2205 - .../Generated/ITopLevelDomainsOperations.cs | 158 - .../src/Generated/IWebAppsOperations.cs | 15921 --- .../src/Generated/IWebSiteManagementClient.cs | 589 - .../Generated/KubeEnvironmentsOperations.cs | 1708 - .../KubeEnvironmentsOperationsExtensions.cs | 467 - .../Generated/Models/AbnormalTimePeriod.cs | 77 - .../Generated/Models/ActiveRevisionsMode.cs | 22 - .../src/Generated/Models/Address.cs | 122 - .../src/Generated/Models/AddressResponse.cs | 89 - .../Models/AllowedAudiencesValidation.cs | 56 - .../src/Generated/Models/AllowedPrincipals.cs | 63 - .../src/Generated/Models/AnalysisData.cs | 85 - .../Generated/Models/AnalysisDefinition.cs | 59 - .../src/Generated/Models/ApiDefinitionInfo.cs | 51 - .../src/Generated/Models/ApiKVReference.cs | 117 - .../Generated/Models/ApiManagementConfig.cs | 51 - .../Models/AppInsightsWebAppStackSettings.cs | 69 - .../Generated/Models/AppLogsConfiguration.cs | 52 - .../src/Generated/Models/AppRegistration.cs | 61 - .../Generated/Models/AppServiceCertificate.cs | 78 - .../Models/AppServiceCertificateOrder.cs | 254 - ...AppServiceCertificateOrderPatchResource.cs | 253 - .../AppServiceCertificatePatchResource.cs | 89 - .../Models/AppServiceCertificateResource.cs | 103 - .../Generated/Models/AppServiceEnvironment.cs | 225 - .../AppServiceEnvironmentPatchResource.cs | 234 - .../Models/AppServiceEnvironmentResource.cs | 237 - .../src/Generated/Models/AppServicePlan.cs | 304 - .../Models/AppServicePlanPatchResource.cs | 280 - .../Models/AppServicePlanRestrictions.cs | 84 - .../src/Generated/Models/Apple.cs | 73 - .../src/Generated/Models/AppleRegistration.cs | 61 - .../Generated/Models/ApplicationLogsConfig.cs | 83 - .../src/Generated/Models/ApplicationStack.cs | 99 - .../Models/ApplicationStackResource.cs | 108 - .../Generated/Models/AppserviceGithubToken.cs | 87 - .../Models/AppserviceGithubTokenRequest.cs | 80 - .../src/Generated/Models/ArcConfiguration.cs | 86 - .../src/Generated/Models/ArmIdWrapper.cs | 49 - .../src/Generated/Models/ArmPlan.cs | 84 - .../Models/AseV3NetworkingConfiguration.cs | 89 - .../src/Generated/Models/AuthPlatform.cs | 83 - .../Generated/Models/AutoHealActionType.cs | 66 - .../src/Generated/Models/AutoHealActions.cs | 72 - .../Generated/Models/AutoHealCustomAction.cs | 60 - .../src/Generated/Models/AutoHealRules.cs | 62 - .../src/Generated/Models/AutoHealTriggers.cs | 97 - .../Generated/Models/AzureActiveDirectory.cs | 103 - .../Models/AzureActiveDirectoryLogin.cs | 70 - .../AzureActiveDirectoryRegistration.cs | 147 - .../Models/AzureActiveDirectoryValidation.cs | 78 - .../AzureBlobStorageApplicationLogsConfig.cs | 77 - .../Models/AzureBlobStorageHttpLogsConfig.cs | 77 - .../src/Generated/Models/AzureResourceType.cs | 60 - .../Generated/Models/AzureStaticWebApps.cs | 66 - .../Models/AzureStaticWebAppsRegistration.cs | 55 - .../Generated/Models/AzureStorageInfoValue.cs | 101 - .../AzureStoragePropertyDictionaryResource.cs | 60 - .../src/Generated/Models/AzureStorageState.cs | 72 - .../src/Generated/Models/AzureStorageType.cs | 60 - .../AzureTableStorageApplicationLogsConfig.cs | 79 - .../src/Generated/Models/BackupItem.cs | 183 - .../src/Generated/Models/BackupItemStatus.cs | 108 - .../src/Generated/Models/BackupRequest.cs | 126 - .../Models/BackupRestoreOperationType.cs | 78 - .../src/Generated/Models/BackupSchedule.cs | 118 - .../src/Generated/Models/BillingMeter.cs | 111 - .../Generated/Models/BlobStorageTokenStore.cs | 55 - .../src/Generated/Models/BuildStatus.cs | 27 - .../Models/BuiltInAuthenticationProvider.cs | 84 - .../src/Generated/Models/Capability.cs | 67 - .../src/Generated/Models/Certificate.cs | 255 - .../Generated/Models/CertificateDetails.cs | 116 - .../src/Generated/Models/CertificateEmail.cs | 67 - .../Models/CertificateOrderAction.cs | 80 - .../Models/CertificateOrderActionType.cs | 132 - .../Models/CertificateOrderContact.cs | 64 - .../Models/CertificateOrderStatus.cs | 108 - .../Models/CertificatePatchResource.cs | 243 - .../Models/CertificateProductType.cs | 60 - .../src/Generated/Models/Channels.cs | 78 - .../Models/CheckNameResourceTypes.cs | 28 - .../src/Generated/Models/ClientCertMode.cs | 66 - .../Models/ClientCredentialMethod.cs | 54 - .../Generated/Models/ClientRegistration.cs | 62 - .../Generated/Models/CloneAbilityResult.cs | 66 - .../src/Generated/Models/CloningInfo.cs | 190 - .../Generated/Models/ComputeModeOptions.cs | 66 - .../Generated/Models/ConfigReferenceSource.cs | 54 - .../src/Generated/Models/Configuration.cs | 95 - .../src/Generated/Models/ConnStringInfo.cs | 72 - .../Models/ConnStringValueTypePair.cs | 78 - .../Models/ConnectionStringDictionary.cs | 58 - .../Generated/Models/ConnectionStringType.cs | 114 - .../src/Generated/Models/Contact.cs | 148 - .../src/Generated/Models/Container.cs | 93 - .../src/Generated/Models/ContainerApp.cs | 122 - .../Models/ContainerAppProvisioningState.cs | 24 - .../Generated/Models/ContainerAppSecret.cs | 59 - .../Models/ContainerAppsConfiguration.cs | 118 - .../Models/ContainerCpuStatistics.cs | 64 - .../src/Generated/Models/ContainerCpuUsage.cs | 66 - .../src/Generated/Models/ContainerInfo.cs | 88 - .../Models/ContainerMemoryStatistics.cs | 58 - .../ContainerNetworkInterfaceStatistics.cs | 90 - .../Generated/Models/ContainerResources.cs | 59 - .../Models/ContainerThrottlingData.cs | 58 - .../src/Generated/Models/ContinuousWebJob.cs | 138 - .../Models/ContinuousWebJobStatus.cs | 78 - .../src/Generated/Models/CookieExpiration.cs | 65 - .../Models/CookieExpirationConvention.cs | 60 - .../src/Generated/Models/CorsSettings.cs | 73 - .../Models/CsmMoveResourceEnvelope.cs | 83 - .../Models/CsmOperationDescription.cs | 74 - .../CsmOperationDescriptionProperties.cs | 51 - .../Generated/Models/CsmOperationDisplay.cs | 67 - .../CsmPublishingCredentialsPoliciesEntity.cs | 75 - .../Models/CsmPublishingProfileOptions.cs | 69 - .../src/Generated/Models/CsmSlotEntity.cs | 78 - .../src/Generated/Models/CsmUsageQuota.cs | 86 - .../Generated/Models/CustomDomainStatus.cs | 26 - .../Models/CustomHostNameDnsRecordType.cs | 60 - .../Models/CustomHostnameAnalysisResult.cs | 170 - .../Generated/Models/CustomHostnameSites.cs | 71 - .../Models/CustomOpenIdConnectProvider.cs | 77 - .../src/Generated/Models/CustomScaleRule.cs | 73 - .../src/Generated/Models/Dapr.cs | 78 - .../src/Generated/Models/DaprComponent.cs | 77 - .../src/Generated/Models/DaprMetadata.cs | 69 - .../Generated/Models/DataProviderMetadata.cs | 59 - .../src/Generated/Models/DataSource.cs | 62 - .../Models/DataTableResponseColumn.cs | 68 - .../Models/DataTableResponseObject.cs | 69 - .../Generated/Models/DatabaseBackupSetting.cs | 101 - .../src/Generated/Models/DatabaseType.cs | 24 - .../Models/DefaultAuthorizationPolicy.cs | 66 - .../Generated/Models/DefaultErrorResponse.cs | 51 - .../Models/DefaultErrorResponseError.cs | 86 - .../DefaultErrorResponseErrorDetailsItem.cs | 72 - .../Models/DefaultErrorResponseException.cs | 62 - .../Models/DeletedAppRestoreRequest.cs | 95 - .../src/Generated/Models/DeletedSite.cs | 118 - .../src/Generated/Models/Deployment.cs | 125 - .../Generated/Models/DeploymentLocations.cs | 74 - .../Models/DetectorAbnormalTimePeriod.cs | 115 - .../Generated/Models/DetectorDefinition.cs | 76 - .../Models/DetectorDefinitionResource.cs | 84 - .../src/Generated/Models/DetectorInfo.cs | 126 - .../src/Generated/Models/DetectorResponse.cs | 98 - .../src/Generated/Models/DetectorType.cs | 66 - .../Generated/Models/DiagnosticAnalysis.cs | 95 - .../Generated/Models/DiagnosticCategory.cs | 60 - .../src/Generated/Models/DiagnosticData.cs | 61 - .../Models/DiagnosticDetectorResponse.cs | 120 - .../Models/DiagnosticMetricSample.cs | 109 - .../Generated/Models/DiagnosticMetricSet.cs | 99 - .../src/Generated/Models/Dimension.cs | 69 - .../src/Generated/Models/DnsType.cs | 60 - .../Models/DnsVerificationTestResult.cs | 66 - .../src/Generated/Models/Domain.cs | 300 - .../Models/DomainAvailabilityCheckResult.cs | 80 - .../Models/DomainControlCenterSsoRequest.cs | 73 - .../Models/DomainOwnershipIdentifier.cs | 59 - .../Generated/Models/DomainPatchResource.cs | 297 - .../Generated/Models/DomainPurchaseConsent.cs | 75 - .../DomainRecommendationSearchParameters.cs | 64 - .../src/Generated/Models/DomainStatus.cs | 174 - .../src/Generated/Models/DomainType.cs | 60 - .../src/Generated/Models/EnabledConfig.cs | 53 - .../Generated/Models/EndpointDependency.cs | 64 - .../src/Generated/Models/EndpointDetail.cs | 84 - .../Models/EnterpriseGradeCdnStatus.cs | 24 - .../src/Generated/Models/EnvironmentVar.cs | 69 - .../src/Generated/Models/ErrorEntity.cs | 109 - .../src/Generated/Models/Experiments.cs | 53 - .../src/Generated/Models/ExtendedLocation.cs | 59 - .../src/Generated/Models/Facebook.cs | 85 - .../Models/FileSystemApplicationLogsConfig.cs | 55 - .../Models/FileSystemHttpLogsConfig.cs | 98 - .../Generated/Models/FileSystemTokenStore.cs | 53 - .../src/Generated/Models/ForwardProxy.cs | 76 - .../Models/ForwardProxyConvention.cs | 66 - .../src/Generated/Models/FrequencyUnit.cs | 60 - .../Generated/Models/FrontEndConfiguration.cs | 49 - .../Generated/Models/FrontEndServiceType.cs | 60 - .../src/Generated/Models/FtpsState.cs | 23 - .../Models/FunctionAppMajorVersion.cs | 71 - .../Models/FunctionAppMinorVersion.cs | 69 - .../Models/FunctionAppRuntimeSettings.cs | 193 - .../Generated/Models/FunctionAppRuntimes.cs | 61 - .../src/Generated/Models/FunctionAppStack.cs | 97 - .../src/Generated/Models/FunctionEnvelope.cs | 159 - .../src/Generated/Models/FunctionSecrets.cs | 59 - .../src/Generated/Models/GeoRegion.cs | 75 - .../src/Generated/Models/GitHub.cs | 74 - .../Models/GitHubActionCodeConfiguration.cs | 65 - .../Models/GitHubActionConfiguration.cs | 82 - .../GitHubActionContainerConfiguration.cs | 83 - .../Models/GitHubActionWebAppStackSettings.cs | 66 - .../Models/GlobalCsmSkuDescription.cs | 104 - .../src/Generated/Models/GlobalValidation.cs | 97 - .../src/Generated/Models/Google.cs | 84 - .../src/Generated/Models/HandlerMapping.cs | 75 - .../src/Generated/Models/HostKeys.cs | 69 - .../src/Generated/Models/HostName.cs | 109 - .../src/Generated/Models/HostNameBinding.cs | 134 - .../src/Generated/Models/HostNameSslState.cs | 101 - .../src/Generated/Models/HostNameType.cs | 60 - .../src/Generated/Models/HostType.cs | 60 - .../HostingEnvironmentDeploymentInfo.cs | 62 - .../Models/HostingEnvironmentDiagnostics.cs | 61 - .../Models/HostingEnvironmentProfile.cs | 69 - .../Models/HostingEnvironmentStatus.cs | 72 - .../src/Generated/Models/HttpLogsConfig.cs | 74 - .../src/Generated/Models/HttpScaleRule.cs | 63 - .../src/Generated/Models/HttpSettings.cs | 77 - .../Generated/Models/HttpSettingsRoutes.cs | 53 - .../src/Generated/Models/HybridConnection.cs | 128 - .../Generated/Models/HybridConnectionKey.cs | 68 - .../Models/HybridConnectionLimits.cs | 70 - .../src/Generated/Models/Identifier.cs | 59 - .../src/Generated/Models/IdentityProviders.cs | 134 - .../Models/InAvailabilityReasonType.cs | 22 - .../Models/InboundEnvironmentEndpoint.cs | 76 - .../src/Generated/Models/Ingress.cs | 100 - .../Models/IngressTransportMethod.cs | 23 - .../src/Generated/Models/InsightStatus.cs | 78 - .../src/Generated/Models/IpFilterTag.cs | 23 - .../Generated/Models/IpSecurityRestriction.cs | 201 - .../src/Generated/Models/IssueType.cs | 96 - .../src/Generated/Models/JwtClaimChecks.cs | 63 - .../src/Generated/Models/KeyInfo.cs | 59 - .../Models/KeyValuePairStringObject.cs | 52 - .../Generated/Models/KeyVaultSecretStatus.cs | 114 - .../src/Generated/Models/KubeEnvironment.cs | 178 - .../Models/KubeEnvironmentPatchResource.cs | 149 - .../Models/KubeEnvironmentProfile.cs | 68 - .../KubeEnvironmentProvisioningState.cs | 108 - .../Models/LegacyMicrosoftAccount.cs | 85 - .../Models/LinuxJavaContainerSettings.cs | 127 - .../src/Generated/Models/LoadBalancingMode.cs | 24 - .../src/Generated/Models/LocalizableString.cs | 59 - .../Models/LogAnalyticsConfiguration.cs | 52 - .../src/Generated/Models/LogLevel.cs | 78 - .../src/Generated/Models/LogSpecification.cs | 67 - .../src/Generated/Models/Login.cs | 118 - .../src/Generated/Models/LoginRoutes.cs | 53 - .../src/Generated/Models/LoginScopes.cs | 56 - .../src/Generated/Models/MSDeploy.cs | 131 - .../src/Generated/Models/MSDeployLog.cs | 61 - .../src/Generated/Models/MSDeployLogEntry.cs | 69 - .../Generated/Models/MSDeployLogEntryType.cs | 66 - .../Models/MSDeployProvisioningState.cs | 78 - .../src/Generated/Models/MSDeployStatus.cs | 95 - .../Generated/Models/ManagedPipelineMode.cs | 60 - .../Models/ManagedServiceIdentity.cs | 88 - .../Models/ManagedServiceIdentityType.cs | 72 - .../Generated/Models/MetricAvailability.cs | 55 - .../Generated/Models/MetricSpecification.cs | 147 - .../Generated/Models/MigrateMySqlRequest.cs | 84 - .../Generated/Models/MigrateMySqlStatus.cs | 80 - .../Generated/Models/MySqlMigrationType.cs | 60 - .../src/Generated/Models/NameIdentifier.cs | 51 - .../src/Generated/Models/NameValuePair.cs | 59 - .../src/Generated/Models/NetworkFeatures.cs | 89 - .../src/Generated/Models/NetworkTrace.cs | 72 - .../src/Generated/Models/Nonce.cs | 65 - .../src/Generated/Models/NotificationLevel.cs | 72 - .../Models/OpenIdConnectClientCredential.cs | 66 - .../Generated/Models/OpenIdConnectConfig.cs | 91 - .../Generated/Models/OpenIdConnectLogin.cs | 65 - .../Models/OpenIdConnectRegistration.cs | 74 - .../src/Generated/Models/Operation.cs | 116 - .../src/Generated/Models/OperationStatus.cs | 78 - .../Models/OutboundEnvironmentEndpoint.cs | 70 - .../src/Generated/Models/Page.cs | 53 - .../src/Generated/Models/PerfMonResponse.cs | 67 - .../src/Generated/Models/PerfMonSample.cs | 69 - .../src/Generated/Models/PerfMonSet.cs | 87 - .../src/Generated/Models/PremierAddOn.cs | 107 - .../src/Generated/Models/PremierAddOnOffer.cs | 139 - .../Models/PremierAddOnPatchResource.cs | 93 - .../src/Generated/Models/PrivateAccess.cs | 72 - .../Generated/Models/PrivateAccessSubnet.cs | 60 - .../Models/PrivateAccessVirtualNetwork.cs | 85 - ...teLinkConnectionApprovalRequestResource.cs | 59 - .../Models/PrivateLinkConnectionState.cs | 69 - .../Generated/Models/PrivateLinkResource.cs | 98 - .../Models/PrivateLinkResourceProperties.cs | 73 - .../Models/PrivateLinkResourcesWrapper.cs | 77 - .../src/Generated/Models/ProcessInfo.cs | 344 - .../src/Generated/Models/ProcessModuleInfo.cs | 141 - .../src/Generated/Models/ProcessThreadInfo.cs | 147 - .../src/Generated/Models/ProvisioningState.cs | 78 - .../src/Generated/Models/ProxyOnlyResource.cs | 78 - .../src/Generated/Models/PublicCertificate.cs | 78 - .../Models/PublicCertificateLocation.cs | 66 - .../Models/PublishingProfileFormat.cs | 23 - .../src/Generated/Models/PushSettings.cs | 111 - .../Generated/Models/QueryUtterancesResult.cs | 59 - .../Models/QueryUtterancesResults.cs | 62 - .../src/Generated/Models/QueueScaleRule.cs | 70 - .../src/Generated/Models/RampUpRule.cs | 152 - .../src/Generated/Models/Recommendation.cs | 280 - .../Generated/Models/RecommendationRule.cs | 184 - .../src/Generated/Models/RedundancyMode.cs | 78 - .../Generated/Models/RegistryCredentials.cs | 69 - .../Models/ReissueCertificateOrderRequest.cs | 90 - .../Models/RelayServiceConnectionEntity.cs | 95 - .../Models/RemotePrivateEndpointConnection.cs | 87 - ...otePrivateEndpointConnectionARMResource.cs | 87 - .../src/Generated/Models/Rendering.cs | 81 - .../src/Generated/Models/RenderingType.cs | 198 - .../Models/RenewCertificateOrderRequest.cs | 80 - .../Generated/Models/RequestsBasedTrigger.cs | 59 - .../src/Generated/Models/ResolveStatus.cs | 114 - .../src/Generated/Models/Resource.cs | 108 - .../Models/ResourceHealthMetadata.cs | 70 - .../Models/ResourceMetricAvailability.cs | 60 - .../Models/ResourceMetricDefinition.cs | 97 - .../Models/ResourceNameAvailability.cs | 89 - .../Models/ResourceNameAvailabilityRequest.cs | 95 - .../src/Generated/Models/ResourceScopeType.cs | 23 - ...EnvelopeRemotePrivateEndpointConnection.cs | 158 - .../src/Generated/Models/ResponseMetaData.cs | 48 - .../src/Generated/Models/RestoreRequest.cs | 198 - .../src/Generated/Models/Revision.cs | 157 - .../Generated/Models/RevisionHealthState.cs | 23 - .../Models/RevisionProvisioningState.cs | 25 - .../src/Generated/Models/RouteType.cs | 23 - .../src/Generated/Models/SampleUtterance.cs | 71 - .../src/Generated/Models/Scale.cs | 72 - .../src/Generated/Models/ScaleRule.cs | 75 - .../src/Generated/Models/ScaleRuleAuth.cs | 62 - .../src/Generated/Models/ScmType.cs | 34 - .../src/Generated/Models/Secret.cs | 59 - .../src/Generated/Models/SecretsCollection.cs | 67 - .../Generated/Models/ServiceSpecification.cs | 58 - .../src/Generated/Models/Site.cs | 539 - .../src/Generated/Models/SiteAuthSettings.cs | 612 - .../Generated/Models/SiteAuthSettingsV2.cs | 108 - .../Generated/Models/SiteAvailabilityState.cs | 66 - .../src/Generated/Models/SiteCloneability.cs | 87 - .../Models/SiteCloneabilityCriterion.cs | 59 - .../src/Generated/Models/SiteConfig.cs | 741 - .../Models/SiteConfigPropertiesDictionary.cs | 84 - .../Generated/Models/SiteConfigResource.cs | 748 - .../Models/SiteConfigurationSnapshotInfo.cs | 69 - .../src/Generated/Models/SiteExtensionInfo.cs | 218 - .../src/Generated/Models/SiteExtensionType.cs | 60 - .../src/Generated/Models/SiteLimits.cs | 70 - .../src/Generated/Models/SiteLoadBalancing.cs | 84 - .../src/Generated/Models/SiteLogsConfig.cs | 103 - .../src/Generated/Models/SiteMachineKey.cs | 75 - .../src/Generated/Models/SitePatchResource.cs | 530 - .../Generated/Models/SitePhpErrorLogFlag.cs | 85 - .../src/Generated/Models/SiteRuntimeState.cs | 66 - .../src/Generated/Models/SiteSeal.cs | 65 - .../src/Generated/Models/SiteSealRequest.cs | 63 - .../src/Generated/Models/SiteSourceControl.cs | 128 - .../src/Generated/Models/SkuCapacity.cs | 93 - .../src/Generated/Models/SkuDescription.cs | 113 - .../src/Generated/Models/SkuInfo.cs | 69 - .../src/Generated/Models/SkuInfos.cs | 63 - .../src/Generated/Models/SkuName.cs | 33 - .../Models/SlotConfigNamesResource.cs | 80 - .../src/Generated/Models/SlotDifference.cs | 115 - .../src/Generated/Models/SlotSwapStatus.cs | 70 - .../Models/SlowRequestsBasedTrigger.cs | 75 - .../src/Generated/Models/Snapshot.cs | 59 - .../Models/SnapshotRecoverySource.cs | 69 - .../Models/SnapshotRestoreRequest.cs | 128 - .../src/Generated/Models/Solution.cs | 103 - .../src/Generated/Models/SolutionType.cs | 66 - .../src/Generated/Models/SourceControl.cs | 83 - .../src/Generated/Models/SslState.cs | 66 - .../src/Generated/Models/StackMajorVersion.cs | 167 - .../src/Generated/Models/StackMinorVersion.cs | 86 - .../src/Generated/Models/StackPreferredOs.cs | 60 - .../Models/StagingEnvironmentPolicy.cs | 60 - .../src/Generated/Models/StampCapacity.cs | 157 - .../Generated/Models/StaticSiteARMResource.cs | 224 - .../Models/StaticSiteBuildARMResource.cs | 127 - .../Models/StaticSiteBuildProperties.cs | 119 - ...aticSiteCustomDomainOverviewARMResource.cs | 99 - ...ustomDomainRequestPropertiesARMResource.cs | 62 - .../StaticSiteFunctionOverviewARMResource.cs | 71 - .../Models/StaticSitePatchResource.cs | 200 - .../StaticSiteResetPropertiesARMResource.cs | 73 - .../Models/StaticSiteTemplateOptions.cs | 91 - .../Models/StaticSiteUserARMResource.cs | 87 - ...StaticSiteUserInvitationRequestResource.cs | 99 - ...taticSiteUserInvitationResponseResource.cs | 70 - .../StaticSiteUserProvidedFunctionApp.cs | 83 - ...cSiteUserProvidedFunctionAppARMResource.cs | 83 - .../StaticSiteZipDeploymentARMResource.cs | 96 - .../Models/StaticSitesWorkflowPreview.cs | 69 - .../StaticSitesWorkflowPreviewRequest.cs | 79 - .../src/Generated/Models/Status.cs | 64 - .../Models/StatusCodesBasedTrigger.cs | 91 - .../Models/StatusCodesRangeBasedTrigger.cs | 75 - .../src/Generated/Models/StatusOptions.cs | 66 - .../Models/StorageMigrationOptions.cs | 110 - .../Models/StorageMigrationResponse.cs | 62 - .../src/Generated/Models/StorageType.cs | 60 - .../src/Generated/Models/StringDictionary.cs | 58 - .../src/Generated/Models/StringList.cs | 58 - .../src/Generated/Models/SupportTopic.cs | 59 - .../Generated/Models/SupportedTlsVersions.cs | 23 - .../Generated/Models/SwiftVirtualNetwork.cs | 75 - .../src/Generated/Models/Template.cs | 84 - .../src/Generated/Models/TldLegalAgreement.cs | 99 - .../src/Generated/Models/TokenStore.cs | 90 - .../src/Generated/Models/TopLevelDomain.cs | 63 - .../Models/TopLevelDomainAgreementOption.cs | 69 - .../src/Generated/Models/TrafficWeight.cs | 69 - .../src/Generated/Models/TriggerTypes.cs | 22 - .../Generated/Models/TriggeredJobHistory.cs | 62 - .../src/Generated/Models/TriggeredJobRun.cs | 133 - .../src/Generated/Models/TriggeredWebJob.cs | 135 - .../Generated/Models/TriggeredWebJobStatus.cs | 66 - .../src/Generated/Models/Twitter.cs | 66 - .../Generated/Models/TwitterRegistration.cs | 71 - .../Models/UnauthenticatedClientAction.cs | 60 - .../Models/UnauthenticatedClientActionV2.cs | 72 - .../src/Generated/Models/Usage.cs | 120 - .../src/Generated/Models/UsageState.cs | 60 - .../src/Generated/Models/User.cs | 108 - .../Generated/Models/UserAssignedIdentity.cs | 60 - .../src/Generated/Models/ValidateRequest.cs | 237 - .../Generated/Models/ValidateResourceTypes.cs | 23 - .../src/Generated/Models/ValidateResponse.cs | 60 - .../Generated/Models/ValidateResponseError.cs | 59 - .../Generated/Models/VirtualApplication.cs | 82 - .../src/Generated/Models/VirtualDirectory.cs | 59 - .../src/Generated/Models/VirtualIPMapping.cs | 84 - .../Generated/Models/VirtualNetworkProfile.cs | 90 - .../src/Generated/Models/VnetGateway.cs | 82 - .../src/Generated/Models/VnetInfo.cs | 116 - .../src/Generated/Models/VnetInfoResource.cs | 124 - .../src/Generated/Models/VnetParameters.cs | 86 - .../src/Generated/Models/VnetRoute.cs | 99 - .../Models/VnetValidationFailureDetails.cs | 91 - .../Models/VnetValidationTestFailure.cs | 70 - .../Generated/Models/WebAppMajorVersion.cs | 71 - .../Generated/Models/WebAppMinorVersion.cs | 69 - .../Generated/Models/WebAppRuntimeSettings.cs | 152 - .../src/Generated/Models/WebAppRuntimes.cs | 81 - .../src/Generated/Models/WebAppStack.cs | 96 - .../src/Generated/Models/WebJob.cs | 111 - .../src/Generated/Models/WebJobType.cs | 60 - .../Generated/Models/WebSiteInstanceStatus.cs | 100 - .../Models/WindowsJavaContainerSettings.cs | 130 - .../Generated/Models/WorkerPoolResource.cs | 105 - .../src/Generated/Models/WorkerSizeOptions.cs | 120 - .../src/Generated/ProviderOperations.cs | 2529 - .../Generated/ProviderOperationsExtensions.cs | 611 - .../Generated/RecommendationsOperations.cs | 4005 - .../RecommendationsOperationsExtensions.cs | 1057 - .../ResourceHealthMetadataOperations.cs | 1986 - ...ourceHealthMetadataOperationsExtensions.cs | 491 - .../SdkInfo_WebSiteManagementClient.cs | 74 - .../src/Generated/StaticSitesOperations.cs | 12615 -- .../StaticSitesOperationsExtensions.cs | 3685 - .../Generated/TopLevelDomainsOperations.cs | 960 - .../TopLevelDomainsOperationsExtensions.cs | 233 - .../src/Generated/WebAppsOperations.cs | 99341 ---------------- .../Generated/WebAppsOperationsExtensions.cs | 26790 ----- .../src/Generated/WebSiteManagementClient.cs | 4716 - .../WebSiteManagementClientExtensions.cs | 973 - ...Microsoft.Azure.Management.Websites.csproj | 24 - .../src/Properties/AssemblyInfo.cs | 19 - .../src/generate.cmd | 7 - .../src/generate.ps1 | 1 - .../Customizations/WebSiteCloudException.cs | 143 - .../Helpers/RecordedDelegatingHandler.cs | 90 - .../tests/Helpers/ResourceGroupHelper.cs | 71 - .../ResourceManagementClientUndoHandlers.cs | 28 - .../tests/Helpers/WebSitesHelper.cs | 35 - ...oft.Azure.Management.WebSites.Tests.csproj | 28 - .../tests/Properties/AssemblyInfo.cs | 22 - .../Recommendations.ScenarioTests.cs | 87 - .../ResourceHealthMetadata.ScenarioTests.cs | 139 - .../SourceControls.ScenarioTests.cs | 63 - .../WebHostingPlan.ScenarioTests.cs | 201 - .../WebSite.Backup.ScenarioTests.cs | 101 - .../ScenarioTests/WebSite.ScenarioTests.cs | 489 - .../WebSiteSlot.ScenarioTests.cs | 187 - .../ListRecommendationsRoundTrip.json | 497 - .../GetResourceHealthMetadata.json | 500 - .../ListResourceHealthMetadata.json | 500 - .../TestUpdateSourceControlUpdates.json | 218 - .../CreateAndDeleteWebHostingPlan.json | 400 - .../CreateAndVerifyListOfWebHostingPlan.json | 359 - .../CreateAndVerifyWebHostingPlan.json | 283 - .../GetAndSetAdminSiteWebHostingPlan.json | 437 - .../WebSiteScenarioTests/CloneSite.json | 431 - .../CreateAndDeleteWebsite.json | 698 - .../CreateAndVerifyGetOnAWebsite.json | 365 - .../CreateAndVerifyListOfWebsites.json | 362 - .../GetAndSetNonSensitiveSiteConfigs.json | 509 - .../GetAndSetSensitiveSiteConfigs.json | 1013 - .../GetAndSetSiteLimits.json | 575 - .../GetAndSetSlotSettingsConfigs.json | 572 - ...nkSourceControlToWebsiteShouldSucceed.json | 422 - .../CreateAndDeleteWebSiteSlot.json | 509 - .../CreateAndVerifyGetOnAWebsiteSlot.json | 443 - .../CreateAndVerifyListOfSlots.json | 443 - 554 files changed, 298275 deletions(-) delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/Microsoft.Azure.Management.Websites.sln delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateRegistrationProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDeletedWebAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainRegistrationProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IRecommendationsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IResourceHealthMetadataOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ITopLevelDomainsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AbnormalTimePeriod.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Address.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AddressResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisData.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisDefinition.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiDefinitionInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiManagementConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificate.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificatePatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanRestrictions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmIdWrapper.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActionType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealCustomAction.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealRules.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageApplicationLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageHttpLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureResourceType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStoragePropertyDictionaryResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureTableStorageApplicationLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItem.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItemStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRestoreOperationType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupSchedule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuildStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuiltInAuthenticationProvider.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Capability.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateDetails.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateEmail.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderAction.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderActionType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateProductType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Channels.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CheckNameResourceTypes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCredentialMethod.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloneAbilityResult.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloningInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ComputeModeOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringValueTypePair.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringDictionary.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Contact.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuStatistics.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuUsage.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerMemoryStatistics.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerNetworkInterfaceStatistics.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerThrottlingData.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJob.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJobStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpirationConvention.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CorsSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmMoveResourceEnvelope.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescriptionProperties.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDisplay.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesEntity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingProfileOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmSlotEntity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmUsageQuota.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostNameDnsRecordType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameAnalysisResult.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataSource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseColumn.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseObject.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseBackupSetting.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseError.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseErrorDetailsItem.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseException.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedAppRestoreRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedSite.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Deployment.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeploymentLocations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorAbnormalTimePeriod.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticAnalysis.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticCategory.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticData.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticDetectorResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSample.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSet.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dimension.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsVerificationTestResult.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Domain.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainAvailabilityCheckResult.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainControlCenterSsoRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainOwnershipIdentifier.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPurchaseConsent.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainRecommendationSearchParameters.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnabledConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDependency.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDetail.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Experiments.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemApplicationLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemHttpLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxyConvention.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrequencyUnit.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FtpsState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionEnvelope.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionSecrets.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GeoRegion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalCsmSkuDescription.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HandlerMapping.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostKeys.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostName.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameBinding.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameSslState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDeploymentInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDiagnostics.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentProfile.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnection.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionKey.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionLimits.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Identifier.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InAvailabilityReasonType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InboundEnvironmentEndpoint.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpFilterTag.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpSecurityRestriction.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IssueType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyVaultSecretStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LocalizableString.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogLevel.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogSpecification.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeploy.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLog.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntry.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntryType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployProvisioningState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedPipelineMode.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricAvailability.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricSpecification.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MySqlMigrationType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameIdentifier.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameValuePair.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkFeatures.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkTrace.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NotificationLevel.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Operation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OperationStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OutboundEnvironmentEndpoint.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Page.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSample.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSet.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOn.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnOffer.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnPatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccess.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessSubnet.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessVirtualNetwork.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourceProperties.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourcesWrapper.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessModuleInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessThreadInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProvisioningState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProxyOnlyResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificate.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificateLocation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublishingProfileFormat.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PushSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RampUpRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Recommendation.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RecommendationRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RedundancyMode.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ReissueCertificateOrderRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RelayServiceConnectionEntity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenewCertificateOrderRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RequestsBasedTrigger.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Resource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceHealthMetadata.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricAvailability.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricDefinition.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailability.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailabilityRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceScopeType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMetaData.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RestoreRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RouteType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScmType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ServiceSpecification.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAvailabilityState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneability.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneabilityCriterion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigurationSnapshotInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLimits.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLogsConfig.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteMachineKey.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePhpErrorLogFlag.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteRuntimeState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSeal.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSealRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuDescription.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfos.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotConfigNamesResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotDifference.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotSwapStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Snapshot.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRecoverySource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRestoreRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Solution.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SolutionType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SourceControl.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SslState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMinorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteFunctionOverviewARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteResetPropertiesARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationRequestResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationResponseResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringDictionary.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportedTlsVersions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SwiftVirtualNetwork.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TldLegalAgreement.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomain.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomainAgreementOption.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggerTypes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobHistory.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJob.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJobStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientAction.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientActionV2.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Usage.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UsageState.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/User.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponse.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponseError.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualApplication.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualDirectory.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualIPMapping.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetGateway.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetRoute.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationTestFailure.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJob.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJobType.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebSiteInstanceStatus.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPoolResource.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.cmd delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.ps1 delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Customizations/WebSiteCloudException.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/RecordedDelegatingHandler.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceGroupHelper.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceManagementClientUndoHandlers.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/WebSitesHelper.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Microsoft.Azure.Management.WebSites.Tests.csproj delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/Properties/AssemblyInfo.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/Recommendations.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/ResourceHealthMetadata.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/SourceControls.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebHostingPlan.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.Backup.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSiteSlot.ScenarioTests.cs delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/RecommendationScenarioTests/ListRecommendationsRoundTrip.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/GetResourceHealthMetadata.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/ListResourceHealthMetadata.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/SourceControlsScenarioTests/TestUpdateSourceControlUpdates.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndDeleteWebHostingPlan.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyListOfWebHostingPlan.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyWebHostingPlan.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/GetAndSetAdminSiteWebHostingPlan.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CloneSite.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndDeleteWebsite.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyGetOnAWebsite.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyListOfWebsites.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetNonSensitiveSiteConfigs.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSensitiveSiteConfigs.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSiteLimits.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSlotSettingsConfigs.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/LinkAndUnlinkSourceControlToWebsiteShouldSucceed.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndDeleteWebSiteSlot.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyGetOnAWebsiteSlot.json delete mode 100644 sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyListOfSlots.json diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props b/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props deleted file mode 100644 index 53ef4aa40d19..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/AzSdk.RP.props +++ /dev/null @@ -1,7 +0,0 @@ - - - - CertificateRegistration_2021-03-01;DomainRegistration_2021-03-01;Web_2021-03-01;Web_2021-03-01;WebSiteManagementClient_2021-03-01; - $(PackageTags);$(CommonTags);$(AzureApiTag); - - \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/Microsoft.Azure.Management.Websites.sln b/sdk/websites/Microsoft.Azure.Management.WebSites/Microsoft.Azure.Management.Websites.sln deleted file mode 100644 index e3e95b8ad3ed..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/Microsoft.Azure.Management.Websites.sln +++ /dev/null @@ -1,40 +0,0 @@ - -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}") = "Microsoft.Azure.Management.WebSites.Tests", "tests\Microsoft.Azure.Management.WebSites.Tests.csproj", "{6279EA29-2462-47D8-B4C6-6797223A6581}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Azure.Management.Websites", "src\Microsoft.Azure.Management.Websites.csproj", "{13B9B921-0CF0-4398-9944-9FDE22989D63}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Azure.Test.HttpRecorder", "..\..\mgmtcommon\TestFramework\Microsoft.Azure.Test.HttpRecorder\Microsoft.Azure.Test.HttpRecorder.csproj", "{D6455FB1-12B2-4BA7-8475-62C1B59E903B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Rest.ClientRuntime.Azure.TestFramework", "..\..\mgmtcommon\TestFramework\ClientRuntime.Azure.TestFramework\Microsoft.Rest.ClientRuntime.Azure.TestFramework.csproj", "{932F27C9-F080-425E-B4FB-EDE2CCFE6709}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {6279EA29-2462-47D8-B4C6-6797223A6581}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6279EA29-2462-47D8-B4C6-6797223A6581}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6279EA29-2462-47D8-B4C6-6797223A6581}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6279EA29-2462-47D8-B4C6-6797223A6581}.Release|Any CPU.Build.0 = Release|Any CPU - {13B9B921-0CF0-4398-9944-9FDE22989D63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {13B9B921-0CF0-4398-9944-9FDE22989D63}.Debug|Any CPU.Build.0 = Debug|Any CPU - {13B9B921-0CF0-4398-9944-9FDE22989D63}.Release|Any CPU.ActiveCfg = Release|Any CPU - {13B9B921-0CF0-4398-9944-9FDE22989D63}.Release|Any CPU.Build.0 = Release|Any CPU - {D6455FB1-12B2-4BA7-8475-62C1B59E903B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {D6455FB1-12B2-4BA7-8475-62C1B59E903B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {D6455FB1-12B2-4BA7-8475-62C1B59E903B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {D6455FB1-12B2-4BA7-8475-62C1B59E903B}.Release|Any CPU.Build.0 = Release|Any CPU - {932F27C9-F080-425E-B4FB-EDE2CCFE6709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {932F27C9-F080-425E-B4FB-EDE2CCFE6709}.Debug|Any CPU.Build.0 = Debug|Any CPU - {932F27C9-F080-425E-B4FB-EDE2CCFE6709}.Release|Any CPU.ActiveCfg = Release|Any CPU - {932F27C9-F080-425E-B4FB-EDE2CCFE6709}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs deleted file mode 100644 index ac950e2ea00a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperations.cs +++ /dev/null @@ -1,4787 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// AppServiceCertificateOrdersOperations operations. - /// - internal partial class AppServiceCertificateOrdersOperations : IServiceOperations, IAppServiceCertificateOrdersOperations - { - /// - /// Initializes a new instance of the AppServiceCertificateOrdersOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal AppServiceCertificateOrdersOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/certificateOrders").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Validate information for a certificate order. - /// - /// - /// Description for Validate information for a certificate order. - /// - /// - /// Information for a certificate order. - /// - /// - /// 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 ValidatePurchaseInformationWithHttpMessagesAsync(AppServiceCertificateOrder appServiceCertificateOrder, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (appServiceCertificateOrder == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appServiceCertificateOrder"); - } - if (appServiceCertificateOrder != null) - { - appServiceCertificateOrder.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("appServiceCertificateOrder", appServiceCertificateOrder); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ValidatePurchaseInformation", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.CertificateRegistration/validateCertificateRegistrationInformation").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(appServiceCertificateOrder != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appServiceCertificateOrder, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.CertificateRegistration/certificateOrders").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a certificate order. - /// - /// - /// Description for Get a certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order.. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - 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.CertificateRegistration/certificateOrders/{certificateOrderName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an existing certificate order. - /// - /// - /// Description for Delete an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - 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.CertificateRegistration/certificateOrders/{certificateOrderName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (certificateDistinguishedName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateDistinguishedName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("certificateDistinguishedName", certificateDistinguishedName); - 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.CertificateRegistration/certificateOrders/{certificateOrderName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(certificateDistinguishedName != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateDistinguishedName, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListCertificatesWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListCertificates", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the certificate associated with a certificate order. - /// - /// - /// Description for Get the certificate associated with a certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetCertificate", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete the certificate associated with a certificate order. - /// - /// - /// Description for Delete the certificate associated with a certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when 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 DeleteCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteCertificate", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificatePatchResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyVaultCertificate == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyVaultCertificate"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("name", name); - tracingParameters.Add("keyVaultCertificate", keyVaultCertificate); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateCertificate", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(keyVaultCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(keyVaultCertificate, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reissue an existing certificate order. - /// - /// - /// Description for Reissue an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Parameters for the reissue. - /// - /// - /// 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 ReissueWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (reissueCertificateOrderRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "reissueCertificateOrderRequest"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("reissueCertificateOrderRequest", reissueCertificateOrderRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Reissue", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(reissueCertificateOrderRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(reissueCertificateOrderRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Renew an existing certificate order. - /// - /// - /// Description for Renew an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Renew 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 RenewWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (renewCertificateOrderRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "renewCertificateOrderRequest"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("renewCertificateOrderRequest", renewCertificateOrderRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Renew", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/renew").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(renewCertificateOrderRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(renewCertificateOrderRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Resend certificate email. - /// - /// - /// Description for Resend certificate email. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 ResendEmailWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResendEmail", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Resend domain verification email to customer for this certificate order - /// - /// - /// Resend domain verification ownership email containing steps on how to - /// verify a domain for a given certificate order - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Email address - /// - /// - /// 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 ResendRequestEmailsWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, NameIdentifier nameIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (nameIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nameIdentifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("nameIdentifier", nameIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResendRequestEmails", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(nameIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(nameIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. - /// - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. A site seal is a graphic that the certificate purchaser can - /// embed on their web site to show their visitors information about their SSL - /// certificate. If a web site visitor clicks on the site seal image, a pop-up - /// page is displayed that contains detailed information about the SSL - /// certificate. The site seal token is used to link the site seal graphic - /// image to the appropriate certificate details pop-up page display when a - /// user clicks on the site seal. The site seal images are expected to be - /// static images and hosted by the reseller, to minimize delays for customer - /// page load times. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Site seal request. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> RetrieveSiteSealWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, SiteSealRequest siteSealRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (siteSealRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSealRequest"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("siteSealRequest", siteSealRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RetrieveSiteSeal", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(siteSealRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSealRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Verify domain ownership for this certificate order. - /// - /// - /// Description for Verify domain ownership for this certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 VerifyDomainOwnershipWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "VerifyDomainOwnership", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieve the list of certificate actions. - /// - /// - /// Description for Retrieve the list of certificate actions. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> RetrieveCertificateActionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RetrieveCertificateActions", 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.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieve email history. - /// - /// - /// Description for Retrieve email history. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> RetrieveCertificateEmailHistoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RetrieveCertificateEmailHistory", 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.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (certificateDistinguishedName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateDistinguishedName"); - } - if (certificateDistinguishedName != null) - { - certificateDistinguishedName.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("certificateDistinguishedName", certificateDistinguishedName); - 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.CertificateRegistration/certificateOrders/{certificateOrderName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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(certificateDistinguishedName != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateDistinguishedName, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyVaultCertificate == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyVaultCertificate"); - } - if (keyVaultCertificate != null) - { - keyVaultCertificate.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("name", name); - tracingParameters.Add("keyVaultCertificate", keyVaultCertificate); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateCertificate", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(keyVaultCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(keyVaultCertificate, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// 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>> ListCertificatesNextWithHttpMessagesAsync(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, "ListCertificatesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs deleted file mode 100644 index 4c412abf611f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceCertificateOrdersOperationsExtensions.cs +++ /dev/null @@ -1,1229 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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 AppServiceCertificateOrdersOperations. - /// - public static partial class AppServiceCertificateOrdersOperationsExtensions - { - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IAppServiceCertificateOrdersOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IAppServiceCertificateOrdersOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validate information for a certificate order. - /// - /// - /// Description for Validate information for a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Information for a certificate order. - /// - public static void ValidatePurchaseInformation(this IAppServiceCertificateOrdersOperations operations, AppServiceCertificateOrder appServiceCertificateOrder) - { - operations.ValidatePurchaseInformationAsync(appServiceCertificateOrder).GetAwaiter().GetResult(); - } - - /// - /// Validate information for a certificate order. - /// - /// - /// Description for Validate information for a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Information for a certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task ValidatePurchaseInformationAsync(this IAppServiceCertificateOrdersOperations operations, AppServiceCertificateOrder appServiceCertificateOrder, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ValidatePurchaseInformationWithHttpMessagesAsync(appServiceCertificateOrder, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a certificate order. - /// - /// - /// Description for Get a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order.. - /// - public static AppServiceCertificateOrder Get(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName) - { - return operations.GetAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// Get a certificate order. - /// - /// - /// Description for Get a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order.. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - public static AppServiceCertificateOrder CreateOrUpdate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName) - { - return operations.CreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).GetAwaiter().GetResult(); - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete an existing certificate order. - /// - /// - /// Description for Delete an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static void Delete(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName) - { - operations.DeleteAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// Delete an existing certificate order. - /// - /// - /// Description for Delete an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - public static AppServiceCertificateOrder Update(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName) - { - return operations.UpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).GetAwaiter().GetResult(); - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static IPage ListCertificates(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName) - { - return operations.ListCertificatesAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCertificatesAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCertificatesWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the certificate associated with a certificate order. - /// - /// - /// Description for Get the certificate associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - public static AppServiceCertificateResource GetCertificate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name) - { - return operations.GetCertificateAsync(resourceGroupName, certificateOrderName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the certificate associated with a certificate order. - /// - /// - /// Description for Get the certificate associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// The cancellation token. - /// - public static async Task GetCertificateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - public static AppServiceCertificateResource CreateOrUpdateCertificate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate) - { - return operations.CreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateCertificateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete the certificate associated with a certificate order. - /// - /// - /// Description for Delete the certificate associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - public static void DeleteCertificate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name) - { - operations.DeleteCertificateAsync(resourceGroupName, certificateOrderName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete the certificate associated with a certificate order. - /// - /// - /// Description for Delete the certificate associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteCertificateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - public static AppServiceCertificateResource UpdateCertificate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificatePatchResource keyVaultCertificate) - { - return operations.UpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateCertificateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificatePatchResource keyVaultCertificate, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reissue an existing certificate order. - /// - /// - /// Description for Reissue an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Parameters for the reissue. - /// - public static void Reissue(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest) - { - operations.ReissueAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest).GetAwaiter().GetResult(); - } - - /// - /// Reissue an existing certificate order. - /// - /// - /// Description for Reissue an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Parameters for the reissue. - /// - /// - /// The cancellation token. - /// - public static async Task ReissueAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ReissueWithHttpMessagesAsync(resourceGroupName, certificateOrderName, reissueCertificateOrderRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Renew an existing certificate order. - /// - /// - /// Description for Renew an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Renew parameters - /// - public static void Renew(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest) - { - operations.RenewAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest).GetAwaiter().GetResult(); - } - - /// - /// Renew an existing certificate order. - /// - /// - /// Description for Renew an existing certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Renew parameters - /// - /// - /// The cancellation token. - /// - public static async Task RenewAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RenewWithHttpMessagesAsync(resourceGroupName, certificateOrderName, renewCertificateOrderRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Resend certificate email. - /// - /// - /// Description for Resend certificate email. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static void ResendEmail(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName) - { - operations.ResendEmailAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// Resend certificate email. - /// - /// - /// Description for Resend certificate email. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task ResendEmailAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResendEmailWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Resend domain verification email to customer for this certificate order - /// - /// - /// Resend domain verification ownership email containing steps on how to - /// verify a domain for a given certificate order - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Email address - /// - public static void ResendRequestEmails(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, NameIdentifier nameIdentifier) - { - operations.ResendRequestEmailsAsync(resourceGroupName, certificateOrderName, nameIdentifier).GetAwaiter().GetResult(); - } - - /// - /// Resend domain verification email to customer for this certificate order - /// - /// - /// Resend domain verification ownership email containing steps on how to - /// verify a domain for a given certificate order - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Email address - /// - /// - /// The cancellation token. - /// - public static async Task ResendRequestEmailsAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, NameIdentifier nameIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResendRequestEmailsWithHttpMessagesAsync(resourceGroupName, certificateOrderName, nameIdentifier, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. - /// - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. A site seal is a graphic that the certificate purchaser can - /// embed on their web site to show their visitors information about their SSL - /// certificate. If a web site visitor clicks on the site seal image, a pop-up - /// page is displayed that contains detailed information about the SSL - /// certificate. The site seal token is used to link the site seal graphic - /// image to the appropriate certificate details pop-up page display when a - /// user clicks on the site seal. The site seal images are expected to be - /// static images and hosted by the reseller, to minimize delays for customer - /// page load times. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Site seal request. - /// - public static SiteSeal RetrieveSiteSeal(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, SiteSealRequest siteSealRequest) - { - return operations.RetrieveSiteSealAsync(resourceGroupName, certificateOrderName, siteSealRequest).GetAwaiter().GetResult(); - } - - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. - /// - /// - /// This method is used to obtain the site seal information for an issued - /// certificate. A site seal is a graphic that the certificate purchaser can - /// embed on their web site to show their visitors information about their SSL - /// certificate. If a web site visitor clicks on the site seal image, a pop-up - /// page is displayed that contains detailed information about the SSL - /// certificate. The site seal token is used to link the site seal graphic - /// image to the appropriate certificate details pop-up page display when a - /// user clicks on the site seal. The site seal images are expected to be - /// static images and hosted by the reseller, to minimize delays for customer - /// page load times. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Site seal request. - /// - /// - /// The cancellation token. - /// - public static async Task RetrieveSiteSealAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, SiteSealRequest siteSealRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RetrieveSiteSealWithHttpMessagesAsync(resourceGroupName, certificateOrderName, siteSealRequest, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Verify domain ownership for this certificate order. - /// - /// - /// Description for Verify domain ownership for this certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static void VerifyDomainOwnership(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName) - { - operations.VerifyDomainOwnershipAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// Verify domain ownership for this certificate order. - /// - /// - /// Description for Verify domain ownership for this certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task VerifyDomainOwnershipAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.VerifyDomainOwnershipWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Retrieve the list of certificate actions. - /// - /// - /// Description for Retrieve the list of certificate actions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static IList RetrieveCertificateActions(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string name) - { - return operations.RetrieveCertificateActionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Retrieve the list of certificate actions. - /// - /// - /// Description for Retrieve the list of certificate actions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task> RetrieveCertificateActionsAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RetrieveCertificateActionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieve email history. - /// - /// - /// Description for Retrieve email history. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - public static IList RetrieveCertificateEmailHistory(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string name) - { - return operations.RetrieveCertificateEmailHistoryAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Retrieve email history. - /// - /// - /// Description for Retrieve email history. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task> RetrieveCertificateEmailHistoryAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RetrieveCertificateEmailHistoryWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - public static AppServiceCertificateOrder BeginCreateOrUpdate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName).GetAwaiter().GetResult(); - } - - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, certificateDistinguishedName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - public static AppServiceCertificateResource BeginCreateOrUpdateCertificate(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate) - { - return operations.BeginCreateOrUpdateCertificateAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a certificate and associates with key vault secret. - /// - /// - /// Description for Creates or updates a certificate and associates with key - /// vault secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateCertificateAsync(this IAppServiceCertificateOrdersOperations operations, string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateCertificateWithHttpMessagesAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IAppServiceCertificateOrdersOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a 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 IAppServiceCertificateOrdersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in 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 IAppServiceCertificateOrdersOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in 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 IAppServiceCertificateOrdersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListCertificatesNext(this IAppServiceCertificateOrdersOperations operations, string nextPageLink) - { - return operations.ListCertificatesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate order. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCertificatesNextAsync(this IAppServiceCertificateOrdersOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCertificatesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs deleted file mode 100644 index ce6e56da299e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperations.cs +++ /dev/null @@ -1,13650 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// AppServiceEnvironmentsOperations operations. - /// - internal partial class AppServiceEnvironmentsOperations : IServiceOperations, IAppServiceEnvironmentsOperations - { - /// - /// Initializes a new instance of the AppServiceEnvironmentsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal AppServiceEnvironmentsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/hostingEnvironments").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/hostingEnvironments").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the properties of an App Service Environment. - /// - /// - /// Description for Get the properties of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/hostingEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, hostingEnvironmentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, forceDelete, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostingEnvironmentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostingEnvironmentEnvelope", hostingEnvironmentEnvelope); - 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.Web/hostingEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(hostingEnvironmentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostingEnvironmentEnvelope, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListCapacitiesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListCapacities", 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.Web/hostingEnvironments/{name}/capacities/compute").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get IP addresses assigned to an App Service Environment. - /// - /// - /// Description for Get IP addresses assigned to an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVipInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVipInfo", 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.Web/hostingEnvironments/{name}/capacities/virtualip").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> ChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginChangeVnetWithHttpMessagesAsync(resourceGroupName, name, vnetInfo, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get networking configuration of an App Service Environment - /// - /// - /// Description for Get networking configuration of an App Service Environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAseV3NetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAseV3NetworkingConfiguration", 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.Web/hostingEnvironments/{name}/configurations/networking").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Update networking configuration of an App Service Environment - /// - /// - /// Description for Update networking configuration of an App Service - /// Environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAseNetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (aseNetworkingConfiguration == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "aseNetworkingConfiguration"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("aseNetworkingConfiguration", aseNetworkingConfiguration); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAseNetworkingConfiguration", 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.Web/hostingEnvironments/{name}/configurations/networking").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(aseNetworkingConfiguration != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(aseNetworkingConfiguration, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get diagnostic information for an App Service Environment. - /// - /// - /// Description for Get diagnostic information for an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListDiagnosticsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDiagnostics", 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.Web/hostingEnvironments/{name}/diagnostics").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a diagnostics item for an App Service Environment. - /// - /// - /// Description for Get a diagnostics item for an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the diagnostics item. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDiagnosticsItemWithHttpMessagesAsync(string resourceGroupName, string name, string diagnosticsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (diagnosticsName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticsName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("diagnosticsName", diagnosticsName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticsItem", 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.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{diagnosticsName}", System.Uri.EscapeDataString(diagnosticsName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetInboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInboundNetworkDependenciesEndpoints", 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.Web/hostingEnvironments/{name}/inboundNetworkDependenciesEndpoints").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListMultiRolePoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePools", 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.Web/hostingEnvironments/{name}/multiRolePools").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get properties of a multi-role pool. - /// - /// - /// Description for Get properties of a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMultiRolePool", 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.Web/hostingEnvironments/{name}/multiRolePools/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (multiRolePoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMultiRolePool", 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.Web/hostingEnvironments/{name}/multiRolePools/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(multiRolePoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the instance in the multi-role pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListMultiRolePoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instance == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instance"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instance", instance); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolInstanceMetricDefinitions", 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.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListMultiRoleMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleMetricDefinitions", 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.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListMultiRolePoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRolePoolSkus", 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.Web/hostingEnvironments/{name}/multiRolePools/default/skus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListMultiRoleUsagesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMultiRoleUsages", 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.Web/hostingEnvironments/{name}/multiRolePools/default/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all currently running operations on the App Service Environment. - /// - /// - /// Description for List all currently running operations on the App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListOperationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOperations", 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.Web/hostingEnvironments/{name}/operations").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOutboundNetworkDependenciesEndpoints", 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.Web/hostingEnvironments/{name}/outboundNetworkDependenciesEndpoints").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionList", 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.Web/hostingEnvironments/{name}/privateEndpointConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResources", 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.Web/hostingEnvironments/{name}/privateLinkResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reboot all machines in an App Service Environment. - /// - /// - /// Description for Reboot all machines in an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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 RebootWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Reboot", 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.Web/hostingEnvironments/{name}/reboot").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> ResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginResumeWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListAppServicePlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAppServicePlans", 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.Web/hostingEnvironments/{name}/serverfarms").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Comma separated list of app properties to include. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string propertiesToInclude = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("propertiesToInclude", propertiesToInclude); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebApps", 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.Web/hostingEnvironments/{name}/sites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (propertiesToInclude != null) - { - _queryParameters.Add(string.Format("propertiesToInclude={0}", System.Uri.EscapeDataString(propertiesToInclude))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> SuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginSuspendWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - /// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", 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.Web/hostingEnvironments/{name}/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWorkerPoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPools", 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.Web/hostingEnvironments/{name}/workerPools").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get properties of a worker pool. - /// - /// - /// Description for Get properties of a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWorkerPool", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (workerPoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("workerPoolEnvelope", workerPoolEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateWorkerPool", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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(workerPoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(workerPoolEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Name of the instance in the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWorkerPoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (instance == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instance"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("instance", instance); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolInstanceMetricDefinitions", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _url = _url.Replace("{instance}", System.Uri.EscapeDataString(instance)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebWorkerMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerMetricDefinitions", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWorkerPoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWorkerPoolSkus", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebWorkerUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebWorkerUsages", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostingEnvironmentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentEnvelope"); - } - if (hostingEnvironmentEnvelope != null) - { - hostingEnvironmentEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostingEnvironmentEnvelope", hostingEnvironmentEnvelope); - 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.Web/hostingEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(hostingEnvironmentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostingEnvironmentEnvelope, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("forceDelete", forceDelete); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (forceDelete != null) - { - _queryParameters.Add(string.Format("forceDelete={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDelete, 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 (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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetInfo == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetInfo"); - } - if (vnetInfo != null) - { - vnetInfo.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetInfo", vnetInfo); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginChangeVnet", 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.Web/hostingEnvironments/{name}/changeVirtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(vnetInfo != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(vnetInfo, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (multiRolePoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "multiRolePoolEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("multiRolePoolEnvelope", multiRolePoolEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateMultiRolePool", 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.Web/hostingEnvironments/{name}/multiRolePools/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(multiRolePoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(multiRolePoolEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", 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.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", 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.Web/hostingEnvironments/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _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; - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginResume", 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.Web/hostingEnvironments/{name}/resume").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSuspend", 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.Web/hostingEnvironments/{name}/suspend").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerPoolName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolName"); - } - if (workerPoolEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerPoolEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerPoolName", workerPoolName); - tracingParameters.Add("workerPoolEnvelope", workerPoolEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateWorkerPool", 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.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerPoolName}", System.Uri.EscapeDataString(workerPoolName)); - _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(workerPoolEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(workerPoolEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// 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>> ListCapacitiesNextWithHttpMessagesAsync(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, "ListCapacitiesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> ChangeVnetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginChangeVnetNextWithHttpMessagesAsync(nextPageLink, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// 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>> GetInboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(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, "GetInboundNetworkDependenciesEndpointsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// 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>> ListMultiRolePoolsNextWithHttpMessagesAsync(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, "ListMultiRolePoolsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// 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>> ListMultiRolePoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(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, "ListMultiRolePoolInstanceMetricDefinitionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// 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>> ListMultiRoleMetricDefinitionsNextWithHttpMessagesAsync(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, "ListMultiRoleMetricDefinitionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// 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>> ListMultiRolePoolSkusNextWithHttpMessagesAsync(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, "ListMultiRolePoolSkusNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// 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>> ListMultiRoleUsagesNextWithHttpMessagesAsync(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, "ListMultiRoleUsagesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// 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>> GetOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(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, "GetOutboundNetworkDependenciesEndpointsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionListNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> ResumeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginResumeNextWithHttpMessagesAsync(nextPageLink, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// 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>> ListAppServicePlansNextWithHttpMessagesAsync(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, "ListAppServicePlansNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// 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>> ListWebAppsNextWithHttpMessagesAsync(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, "ListWebAppsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> SuspendNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginSuspendNextWithHttpMessagesAsync(nextPageLink, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(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, "ListUsagesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// 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>> ListWorkerPoolsNextWithHttpMessagesAsync(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, "ListWorkerPoolsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// 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>> ListWorkerPoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(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, "ListWorkerPoolInstanceMetricDefinitionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// 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>> ListWebWorkerMetricDefinitionsNextWithHttpMessagesAsync(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, "ListWebWorkerMetricDefinitionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// 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>> ListWorkerPoolSkusNextWithHttpMessagesAsync(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, "ListWorkerPoolSkusNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// 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>> ListWebWorkerUsagesNextWithHttpMessagesAsync(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, "ListWebWorkerUsagesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// 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>> BeginChangeVnetNextWithHttpMessagesAsync(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, "BeginChangeVnetNext", 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("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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// 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>> BeginResumeNextWithHttpMessagesAsync(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, "BeginResumeNext", 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("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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// 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>> BeginSuspendNextWithHttpMessagesAsync(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, "BeginSuspendNext", 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("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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs deleted file mode 100644 index b77535a589eb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServiceEnvironmentsOperationsExtensions.cs +++ /dev/null @@ -1,3660 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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 AppServiceEnvironmentsOperations. - /// - public static partial class AppServiceEnvironmentsOperationsExtensions - { - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IAppServiceEnvironmentsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IAppServiceEnvironmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IAppServiceEnvironmentsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the properties of an App Service Environment. - /// - /// - /// Description for Get the properties of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static AppServiceEnvironmentResource Get(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the properties of an App Service Environment. - /// - /// - /// Description for Get the properties of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - public static AppServiceEnvironmentResource CreateOrUpdate(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, hostingEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - public static void Delete(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, bool? forceDelete = default(bool?)) - { - operations.DeleteAsync(resourceGroupName, name, forceDelete).GetAwaiter().GetResult(); - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, bool? forceDelete = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, forceDelete, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - public static AppServiceEnvironmentResource Update(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope) - { - return operations.UpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, hostingEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListCapacities(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListCapacitiesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCapacitiesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCapacitiesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get IP addresses assigned to an App Service Environment. - /// - /// - /// Description for Get IP addresses assigned to an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static AddressResponse GetVipInfo(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetVipInfoAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get IP addresses assigned to an App Service Environment. - /// - /// - /// Description for Get IP addresses assigned to an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetVipInfoAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVipInfoWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - public static IPage ChangeVnet(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, VirtualNetworkProfile vnetInfo) - { - return operations.ChangeVnetAsync(resourceGroupName, name, vnetInfo).GetAwaiter().GetResult(); - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// The cancellation token. - /// - public static async Task> ChangeVnetAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ChangeVnetWithHttpMessagesAsync(resourceGroupName, name, vnetInfo, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get networking configuration of an App Service Environment - /// - /// - /// Description for Get networking configuration of an App Service Environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static AseV3NetworkingConfiguration GetAseV3NetworkingConfiguration(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetAseV3NetworkingConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get networking configuration of an App Service Environment - /// - /// - /// Description for Get networking configuration of an App Service Environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAseV3NetworkingConfigurationAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAseV3NetworkingConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Update networking configuration of an App Service Environment - /// - /// - /// Description for Update networking configuration of an App Service - /// Environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - public static AseV3NetworkingConfiguration UpdateAseNetworkingConfiguration(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration) - { - return operations.UpdateAseNetworkingConfigurationAsync(resourceGroupName, name, aseNetworkingConfiguration).GetAwaiter().GetResult(); - } - - /// - /// Update networking configuration of an App Service Environment - /// - /// - /// Description for Update networking configuration of an App Service - /// Environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAseNetworkingConfigurationAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAseNetworkingConfigurationWithHttpMessagesAsync(resourceGroupName, name, aseNetworkingConfiguration, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get diagnostic information for an App Service Environment. - /// - /// - /// Description for Get diagnostic information for an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IList ListDiagnostics(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListDiagnosticsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get diagnostic information for an App Service Environment. - /// - /// - /// Description for Get diagnostic information for an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDiagnosticsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDiagnosticsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a diagnostics item for an App Service Environment. - /// - /// - /// Description for Get a diagnostics item for an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the diagnostics item. - /// - public static HostingEnvironmentDiagnostics GetDiagnosticsItem(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string diagnosticsName) - { - return operations.GetDiagnosticsItemAsync(resourceGroupName, name, diagnosticsName).GetAwaiter().GetResult(); - } - - /// - /// Get a diagnostics item for an App Service Environment. - /// - /// - /// Description for Get a diagnostics item for an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the diagnostics item. - /// - /// - /// The cancellation token. - /// - public static async Task GetDiagnosticsItemAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string diagnosticsName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDiagnosticsItemWithHttpMessagesAsync(resourceGroupName, name, diagnosticsName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage GetInboundNetworkDependenciesEndpoints(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetInboundNetworkDependenciesEndpointsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> GetInboundNetworkDependenciesEndpointsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListMultiRolePools(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListMultiRolePoolsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get properties of a multi-role pool. - /// - /// - /// Description for Get properties of a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static WorkerPoolResource GetMultiRolePool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetMultiRolePoolAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get properties of a multi-role pool. - /// - /// - /// Description for Get properties of a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetMultiRolePoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - public static WorkerPoolResource CreateOrUpdateMultiRolePool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope) - { - return operations.CreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateMultiRolePoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - public static WorkerPoolResource UpdateMultiRolePool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope) - { - return operations.UpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateMultiRolePoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the instance in the multi-role pool. - /// - public static IPage ListMultiRolePoolInstanceMetricDefinitions(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string instance) - { - return operations.ListMultiRolePoolInstanceMetricDefinitionsAsync(resourceGroupName, name, instance).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the instance in the multi-role pool. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolInstanceMetricDefinitionsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string instance, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolInstanceMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, name, instance, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListMultiRoleMetricDefinitions(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListMultiRoleMetricDefinitionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRoleMetricDefinitionsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRoleMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListMultiRolePoolSkus(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListMultiRolePoolSkusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolSkusAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolSkusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListMultiRoleUsages(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListMultiRoleUsagesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRoleUsagesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRoleUsagesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all currently running operations on the App Service Environment. - /// - /// - /// Description for List all currently running operations on the App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IList ListOperations(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListOperationsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List all currently running operations on the App Service Environment. - /// - /// - /// Description for List all currently running operations on the App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage GetOutboundNetworkDependenciesEndpoints(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetOutboundNetworkDependenciesEndpointsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> GetOutboundNetworkDependenciesEndpointsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage GetPrivateEndpointConnectionList(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the private endpoint connection. - /// - public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - public static object DeletePrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeletePrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateLinkResourcesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reboot all machines in an App Service Environment. - /// - /// - /// Description for Reboot all machines in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static void Reboot(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - operations.RebootAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Reboot all machines in an App Service Environment. - /// - /// - /// Description for Reboot all machines in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task RebootAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RebootWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage Resume(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ResumeAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ResumeAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResumeWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListAppServicePlans(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListAppServicePlansAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAppServicePlansAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAppServicePlansWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Comma separated list of app properties to include. - /// - public static IPage ListWebApps(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string propertiesToInclude = default(string)) - { - return operations.ListWebAppsAsync(resourceGroupName, name, propertiesToInclude).GetAwaiter().GetResult(); - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Comma separated list of app properties to include. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string propertiesToInclude = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsWithHttpMessagesAsync(resourceGroupName, name, propertiesToInclude, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage Suspend(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.SuspendAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> SuspendAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.SuspendWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - /// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - /// - public static IPage ListUsages(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string filter = default(string)) - { - return operations.ListUsagesAsync(resourceGroupName, name, filter).GetAwaiter().GetResult(); - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2') and startTime eq 2014-01-01T00:00:00Z and endTime eq - /// 2014-12-31T23:59:59Z and timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, name, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage ListWorkerPools(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.ListWorkerPoolsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get properties of a worker pool. - /// - /// - /// Description for Get properties of a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - public static WorkerPoolResource GetWorkerPool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName) - { - return operations.GetWorkerPoolAsync(resourceGroupName, name, workerPoolName).GetAwaiter().GetResult(); - } - - /// - /// Get properties of a worker pool. - /// - /// - /// Description for Get properties of a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task GetWorkerPoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - public static WorkerPoolResource CreateOrUpdateWorkerPool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope) - { - return operations.CreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateWorkerPoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - public static WorkerPoolResource UpdateWorkerPool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope) - { - return operations.UpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateWorkerPoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Name of the instance in the worker pool. - /// - public static IPage ListWorkerPoolInstanceMetricDefinitions(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, string instance) - { - return operations.ListWorkerPoolInstanceMetricDefinitionsAsync(resourceGroupName, name, workerPoolName, instance).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Name of the instance in the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolInstanceMetricDefinitionsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, string instance, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolInstanceMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, instance, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - public static IPage ListWebWorkerMetricDefinitions(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName) - { - return operations.ListWebWorkerMetricDefinitionsAsync(resourceGroupName, name, workerPoolName).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebWorkerMetricDefinitionsAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebWorkerMetricDefinitionsWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - public static IPage ListWorkerPoolSkus(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName) - { - return operations.ListWorkerPoolSkusAsync(resourceGroupName, name, workerPoolName).GetAwaiter().GetResult(); - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolSkusAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolSkusWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - public static IPage ListWebWorkerUsages(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName) - { - return operations.ListWebWorkerUsagesAsync(resourceGroupName, name, workerPoolName).GetAwaiter().GetResult(); - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebWorkerUsagesAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebWorkerUsagesWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - public static AppServiceEnvironmentResource BeginCreateOrUpdate(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, hostingEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, hostingEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - public static void BeginDelete(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, bool? forceDelete = default(bool?)) - { - operations.BeginDeleteAsync(resourceGroupName, name, forceDelete).GetAwaiter().GetResult(); - } - - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if the App - /// Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, bool? forceDelete = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, forceDelete, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - public static IPage BeginChangeVnet(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, VirtualNetworkProfile vnetInfo) - { - return operations.BeginChangeVnetAsync(resourceGroupName, name, vnetInfo).GetAwaiter().GetResult(); - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginChangeVnetAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginChangeVnetWithHttpMessagesAsync(resourceGroupName, name, vnetInfo, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - public static WorkerPoolResource BeginCreateOrUpdateMultiRolePool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope) - { - return operations.BeginCreateOrUpdateMultiRolePoolAsync(resourceGroupName, name, multiRolePoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateMultiRolePoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(resourceGroupName, name, multiRolePoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - public static object BeginDeletePrivateEndpointConnection(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeletePrivateEndpointConnectionAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage BeginResume(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.BeginResumeAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginResumeAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResumeWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - public static IPage BeginSuspend(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.BeginSuspendAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginSuspendAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginSuspendWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - public static WorkerPoolResource BeginCreateOrUpdateWorkerPool(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope) - { - return operations.BeginCreateOrUpdateWorkerPoolAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateWorkerPoolAsync(this IAppServiceEnvironmentsOperations operations, string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a 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 IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in 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 IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in 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 IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListCapacitiesNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListCapacitiesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCapacitiesNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCapacitiesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ChangeVnetNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ChangeVnetNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ChangeVnetNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ChangeVnetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetInboundNetworkDependenciesEndpointsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.GetInboundNetworkDependenciesEndpointsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the network endpoints of all inbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all inbound dependencies of an - /// App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetInboundNetworkDependenciesEndpointsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListMultiRolePoolsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListMultiRolePoolsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListMultiRolePoolInstanceMetricDefinitionsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListMultiRolePoolInstanceMetricDefinitionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a specific instance of a multi-role pool of an - /// App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolInstanceMetricDefinitionsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListMultiRoleMetricDefinitionsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListMultiRoleMetricDefinitionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an App - /// Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRoleMetricDefinitionsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRoleMetricDefinitionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListMultiRolePoolSkusNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListMultiRolePoolSkusNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRolePoolSkusNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRolePoolSkusNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListMultiRoleUsagesNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListMultiRoleUsagesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get usage metrics for a multi-role pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListMultiRoleUsagesNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMultiRoleUsagesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetOutboundNetworkDependenciesEndpointsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.GetOutboundNetworkDependenciesEndpointsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the network endpoints of all outbound dependencies of an App Service - /// Environment. - /// - /// - /// Description for Get the network endpoints of all outbound dependencies of - /// an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetOutboundNetworkDependenciesEndpointsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetPrivateEndpointConnectionListNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoints associated with a hosting environment - /// - /// - /// Description for Gets the list of private endpoints associated with a - /// hosting environment - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ResumeNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ResumeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ResumeNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ResumeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAppServicePlansNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListAppServicePlansNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAppServicePlansNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAppServicePlansNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebAppsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWebAppsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage SuspendNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.SuspendNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> SuspendNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.SuspendNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListUsagesNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListUsagesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWorkerPoolsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWorkerPoolsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWorkerPoolInstanceMetricDefinitionsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWorkerPoolInstanceMetricDefinitionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a specific instance of a worker pool of an App - /// Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a worker - /// pool of an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolInstanceMetricDefinitionsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebWorkerMetricDefinitionsNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWebWorkerMetricDefinitionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get metric definitions for a worker pool of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebWorkerMetricDefinitionsNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebWorkerMetricDefinitionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWorkerPoolSkusNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWorkerPoolSkusNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWorkerPoolSkusNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWorkerPoolSkusNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebWorkerUsagesNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListWebWorkerUsagesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App Service - /// Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebWorkerUsagesNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebWorkerUsagesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage BeginChangeVnetNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.BeginChangeVnetNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different VNET. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginChangeVnetNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginChangeVnetNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage BeginResumeNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.BeginResumeNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginResumeNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginResumeNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage BeginSuspendNext(this IAppServiceEnvironmentsOperations operations, string nextPageLink) - { - return operations.BeginSuspendNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginSuspendNextAsync(this IAppServiceEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginSuspendNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs deleted file mode 100644 index e4b195f768c6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperations.cs +++ /dev/null @@ -1,6996 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// AppServicePlansOperations operations. - /// - internal partial class AppServicePlansOperations : IServiceOperations, IAppServicePlansOperations - { - /// - /// Initializes a new instance of the AppServicePlansOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal AppServicePlansOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a subscription. - /// - /// - /// Specify <code>true</code> to return all App Service plan - /// properties. The default is <code>false</code>, which returns a - /// subset of the properties. - /// Retrieval of all properties may increase the API latency. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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(bool? detailed = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("detailed", detailed); - 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.Web/serverfarms").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (detailed != null) - { - _queryParameters.Add(string.Format("detailed={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(detailed, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/serverfarms").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get an App Service plan. - /// - /// - /// Description for Get an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/serverfarms/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, AppServicePlan appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, appServicePlan, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an App Service plan. - /// - /// - /// Description for Delete an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/serverfarms/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, AppServicePlanPatchResource appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appServicePlan == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appServicePlan"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appServicePlan", appServicePlan); - 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.Web/serverfarms/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(appServicePlan != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appServicePlan, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all capabilities of an App Service plan. - /// - /// - /// Description for List all capabilities of an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListCapabilitiesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListCapabilities", 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.Web/serverfarms/{name}/capabilities").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnection", 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.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// 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 DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnection", 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.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get the send key name and value of a Hybrid Connection. - /// - /// - /// Description for Get the send key name and value of a Hybrid Connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The name of the Service Bus namespace. - /// - /// - /// The name of the Service Bus relay. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListHybridConnectionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnectionKeys", 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.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Hybrid Connection namespace. - /// - /// - /// Name of the Hybrid Connection relay. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebAppsByHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebAppsByHybridConnection", 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.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the maximum number of Hybrid Connections allowed in an App Service - /// plan. - /// - /// - /// Description for Get the maximum number of Hybrid Connections allowed in an - /// App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHybridConnectionPlanLimitWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnectionPlanLimit", 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.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnections", 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.Web/serverfarms/{name}/hybridConnectionRelays").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restart all apps in an App Service plan. - /// - /// - /// Description for Restart all apps in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Specify <code>true</code> to perform a soft restart, applies - /// the configuration settings and restarts the apps if necessary. The default - /// is <code>false</code>, which always restarts and reprovisions - /// the apps - /// - /// - /// 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 RestartWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RestartWebApps", 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.Web/serverfarms/{name}/restartSites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Skip to a web app in the list of webapps associated with app service plan. - /// If specified, the resulting list will contain web apps starting from - /// (including) the skipToken. Otherwise, the resulting list contains web apps - /// from the start of the list - /// - /// - /// Supported filter: $filter=state eq running. Returns only web apps that are - /// currently running - /// - /// - /// List page size. If specified, results are paged. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string skipToken = default(string), string filter = default(string), string top = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("skipToken", skipToken); - tracingParameters.Add("filter", filter); - tracingParameters.Add("top", top); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebApps", 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.Web/serverfarms/{name}/sites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 (skipToken != null) - { - _queryParameters.Add(string.Format("$skipToken={0}", System.Uri.EscapeDataString(skipToken))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - if (top != null) - { - _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(top))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all selectable SKUs for a given App Service Plan - /// - /// - /// Description for Gets all selectable SKUs for a given App Service Plan - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetServerFarmSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetServerFarmSkus", 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.Web/serverfarms/{name}/skus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2'). - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", 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.Web/serverfarms/{name}/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all Virtual Networks associated with an App Service plan. - /// - /// - /// Description for Get all Virtual Networks associated with an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnets", 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.Web/serverfarms/{name}/virtualNetworkConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a Virtual Network associated with an App Service plan. - /// - /// - /// Description for Get a Virtual Network associated with an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetFromServerFarm", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a Virtual Network gateway. - /// - /// - /// Description for Get a Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetGateway", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Update a Virtual Network gateway. - /// - /// - /// Description for Update a Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// Definition of the gateway. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetGateway", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all routes that are associated with a Virtual Network in an App Service - /// plan. - /// - /// - /// Description for Get all routes that are associated with a Virtual Network - /// in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListRoutesForVnetWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRoutesForVnet", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a Virtual Network route in an App Service plan. - /// - /// - /// Description for Get a Virtual Network route in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetRouteForVnetWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (routeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "routeName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("routeName", routeName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRouteForVnet", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{routeName}", System.Uri.EscapeDataString(routeName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (routeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "routeName"); - } - if (route == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "route"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("routeName", routeName); - tracingParameters.Add("route", route); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetRoute", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{routeName}", System.Uri.EscapeDataString(routeName)); - _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(route != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(route, 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 != 400 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a Virtual Network route in an App Service plan. - /// - /// - /// Description for Delete a Virtual Network route in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// 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 DeleteVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (routeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "routeName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("routeName", routeName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetRoute", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{routeName}", System.Uri.EscapeDataString(routeName)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (routeName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "routeName"); - } - if (route == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "route"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("routeName", routeName); - tracingParameters.Add("route", route); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetRoute", 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.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{routeName}", System.Uri.EscapeDataString(routeName)); - _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(route != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(route, 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 != 400 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reboot a worker machine in an App Service plan. - /// - /// - /// Description for Reboot a worker machine in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of worker machine, which typically starts with RD. - /// - /// - /// 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 RebootWorkerWithHttpMessagesAsync(string resourceGroupName, string name, string workerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (workerName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "workerName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("workerName", workerName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RebootWorker", 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.Web/serverfarms/{name}/workers/{workerName}/reboot").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{workerName}", System.Uri.EscapeDataString(workerName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, AppServicePlan appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appServicePlan == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appServicePlan"); - } - if (appServicePlan != null) - { - appServicePlan.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appServicePlan", appServicePlan); - 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.Web/serverfarms/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(appServicePlan != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appServicePlan, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// 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>> ListWebAppsByHybridConnectionNextWithHttpMessagesAsync(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, "ListWebAppsByHybridConnectionNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// 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>> ListHybridConnectionsNextWithHttpMessagesAsync(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, "ListHybridConnectionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// 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>> ListWebAppsNextWithHttpMessagesAsync(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, "ListWebAppsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(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, "ListUsagesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs deleted file mode 100644 index df4059ded179..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/AppServicePlansOperationsExtensions.cs +++ /dev/null @@ -1,1778 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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 AppServicePlansOperations. - /// - public static partial class AppServicePlansOperationsExtensions - { - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Specify <code>true</code> to return all App Service plan - /// properties. The default is <code>false</code>, which returns a - /// subset of the properties. - /// Retrieval of all properties may increase the API latency. - /// - public static IPage List(this IAppServicePlansOperations operations, bool? detailed = default(bool?)) - { - return operations.ListAsync(detailed).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Specify <code>true</code> to return all App Service plan - /// properties. The default is <code>false</code>, which returns a - /// subset of the properties. - /// Retrieval of all properties may increase the API latency. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IAppServicePlansOperations operations, bool? detailed = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(detailed, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IAppServicePlansOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IAppServicePlansOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get an App Service plan. - /// - /// - /// Description for Get an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static AppServicePlan Get(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get an App Service plan. - /// - /// - /// Description for Get an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - public static AppServicePlan CreateOrUpdate(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlan appServicePlan) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, appServicePlan).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlan appServicePlan, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, appServicePlan, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete an App Service plan. - /// - /// - /// Description for Delete an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static void Delete(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete an App Service plan. - /// - /// - /// Description for Delete an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - public static AppServicePlan Update(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlanPatchResource appServicePlan) - { - return operations.UpdateAsync(resourceGroupName, name, appServicePlan).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlanPatchResource appServicePlan, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, appServicePlan, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all capabilities of an App Service plan. - /// - /// - /// Description for List all capabilities of an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static IList ListCapabilities(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.ListCapabilitiesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List all capabilities of an App Service plan. - /// - /// - /// Description for List all capabilities of an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCapabilitiesAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCapabilitiesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - public static HybridConnection GetHybridConnection(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - return operations.GetHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// The cancellation token. - /// - public static async Task GetHybridConnectionAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - public static void DeleteHybridConnection(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - operations.DeleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHybridConnectionAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get the send key name and value of a Hybrid Connection. - /// - /// - /// Description for Get the send key name and value of a Hybrid Connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The name of the Service Bus namespace. - /// - /// - /// The name of the Service Bus relay. - /// - public static HybridConnectionKey ListHybridConnectionKeys(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - return operations.ListHybridConnectionKeysAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Get the send key name and value of a Hybrid Connection. - /// - /// - /// Description for Get the send key name and value of a Hybrid Connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The name of the Service Bus namespace. - /// - /// - /// The name of the Service Bus relay. - /// - /// - /// The cancellation token. - /// - public static async Task ListHybridConnectionKeysAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHybridConnectionKeysWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Hybrid Connection namespace. - /// - /// - /// Name of the Hybrid Connection relay. - /// - public static IPage ListWebAppsByHybridConnection(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - return operations.ListWebAppsByHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Hybrid Connection namespace. - /// - /// - /// Name of the Hybrid Connection relay. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsByHybridConnectionAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsByHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the maximum number of Hybrid Connections allowed in an App Service - /// plan. - /// - /// - /// Description for Get the maximum number of Hybrid Connections allowed in an - /// App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static HybridConnectionLimits GetHybridConnectionPlanLimit(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.GetHybridConnectionPlanLimitAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the maximum number of Hybrid Connections allowed in an App Service - /// plan. - /// - /// - /// Description for Get the maximum number of Hybrid Connections allowed in an - /// App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task GetHybridConnectionPlanLimitAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHybridConnectionPlanLimitWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static IPage ListHybridConnections(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.ListHybridConnectionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHybridConnectionsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHybridConnectionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restart all apps in an App Service plan. - /// - /// - /// Description for Restart all apps in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Specify <code>true</code> to perform a soft restart, applies - /// the configuration settings and restarts the apps if necessary. The default - /// is <code>false</code>, which always restarts and reprovisions - /// the apps - /// - public static void RestartWebApps(this IAppServicePlansOperations operations, string resourceGroupName, string name, bool? softRestart = default(bool?)) - { - operations.RestartWebAppsAsync(resourceGroupName, name, softRestart).GetAwaiter().GetResult(); - } - - /// - /// Restart all apps in an App Service plan. - /// - /// - /// Description for Restart all apps in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Specify <code>true</code> to perform a soft restart, applies - /// the configuration settings and restarts the apps if necessary. The default - /// is <code>false</code>, which always restarts and reprovisions - /// the apps - /// - /// - /// The cancellation token. - /// - public static async Task RestartWebAppsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, bool? softRestart = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestartWebAppsWithHttpMessagesAsync(resourceGroupName, name, softRestart, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Skip to a web app in the list of webapps associated with app service plan. - /// If specified, the resulting list will contain web apps starting from - /// (including) the skipToken. Otherwise, the resulting list contains web apps - /// from the start of the list - /// - /// - /// Supported filter: $filter=state eq running. Returns only web apps that are - /// currently running - /// - /// - /// List page size. If specified, results are paged. - /// - public static IPage ListWebApps(this IAppServicePlansOperations operations, string resourceGroupName, string name, string skipToken = default(string), string filter = default(string), string top = default(string)) - { - return operations.ListWebAppsAsync(resourceGroupName, name, skipToken, filter, top).GetAwaiter().GetResult(); - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Skip to a web app in the list of webapps associated with app service plan. - /// If specified, the resulting list will contain web apps starting from - /// (including) the skipToken. Otherwise, the resulting list contains web apps - /// from the start of the list - /// - /// - /// Supported filter: $filter=state eq running. Returns only web apps that are - /// currently running - /// - /// - /// List page size. If specified, results are paged. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string skipToken = default(string), string filter = default(string), string top = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsWithHttpMessagesAsync(resourceGroupName, name, skipToken, filter, top, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all selectable SKUs for a given App Service Plan - /// - /// - /// Description for Gets all selectable SKUs for a given App Service Plan - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - public static object GetServerFarmSkus(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.GetServerFarmSkusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets all selectable SKUs for a given App Service Plan - /// - /// - /// Description for Gets all selectable SKUs for a given App Service Plan - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// The cancellation token. - /// - public static async Task GetServerFarmSkusAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetServerFarmSkusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2'). - /// - public static IPage ListUsages(this IAppServicePlansOperations operations, string resourceGroupName, string name, string filter = default(string)) - { - return operations.ListUsagesAsync(resourceGroupName, name, filter).GetAwaiter().GetResult(); - } - - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq - /// 'Metric2'). - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, name, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all Virtual Networks associated with an App Service plan. - /// - /// - /// Description for Get all Virtual Networks associated with an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - public static IList ListVnets(this IAppServicePlansOperations operations, string resourceGroupName, string name) - { - return operations.ListVnetsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get all Virtual Networks associated with an App Service plan. - /// - /// - /// Description for Get all Virtual Networks associated with an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task> ListVnetsAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListVnetsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a Virtual Network associated with an App Service plan. - /// - /// - /// Description for Get a Virtual Network associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - public static VnetInfoResource GetVnetFromServerFarm(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName) - { - return operations.GetVnetFromServerFarmAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); - } - - /// - /// Get a Virtual Network associated with an App Service plan. - /// - /// - /// Description for Get a Virtual Network associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetFromServerFarmAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetFromServerFarmWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a Virtual Network gateway. - /// - /// - /// Description for Get a Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - public static VnetGateway GetVnetGateway(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName) - { - return operations.GetVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName).GetAwaiter().GetResult(); - } - - /// - /// Get a Virtual Network gateway. - /// - /// - /// Description for Get a Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetGatewayAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetGatewayWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Update a Virtual Network gateway. - /// - /// - /// Description for Update a Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// Definition of the gateway. - /// - public static VnetGateway UpdateVnetGateway(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope) - { - return operations.UpdateVnetGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Update a Virtual Network gateway. - /// - /// - /// Description for Update a Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// Definition of the gateway. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetGatewayAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetGatewayWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all routes that are associated with a Virtual Network in an App Service - /// plan. - /// - /// - /// Description for Get all routes that are associated with a Virtual Network - /// in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - public static IList ListRoutesForVnet(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName) - { - return operations.ListRoutesForVnetAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); - } - - /// - /// Get all routes that are associated with a Virtual Network in an App Service - /// plan. - /// - /// - /// Description for Get all routes that are associated with a Virtual Network - /// in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRoutesForVnetAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRoutesForVnetWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a Virtual Network route in an App Service plan. - /// - /// - /// Description for Get a Virtual Network route in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - public static IList GetRouteForVnet(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName) - { - return operations.GetRouteForVnetAsync(resourceGroupName, name, vnetName, routeName).GetAwaiter().GetResult(); - } - - /// - /// Get a Virtual Network route in an App Service plan. - /// - /// - /// Description for Get a Virtual Network route in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// The cancellation token. - /// - public static async Task> GetRouteForVnetAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRouteForVnetWithHttpMessagesAsync(resourceGroupName, name, vnetName, routeName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - public static VnetRoute CreateOrUpdateVnetRoute(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route) - { - return operations.CreateOrUpdateVnetRouteAsync(resourceGroupName, name, vnetName, routeName, route).GetAwaiter().GetResult(); - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateVnetRouteAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateVnetRouteWithHttpMessagesAsync(resourceGroupName, name, vnetName, routeName, route, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Virtual Network route in an App Service plan. - /// - /// - /// Description for Delete a Virtual Network route in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - public static void DeleteVnetRoute(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName) - { - operations.DeleteVnetRouteAsync(resourceGroupName, name, vnetName, routeName).GetAwaiter().GetResult(); - } - - /// - /// Delete a Virtual Network route in an App Service plan. - /// - /// - /// Description for Delete a Virtual Network route in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteVnetRouteAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteVnetRouteWithHttpMessagesAsync(resourceGroupName, name, vnetName, routeName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - public static VnetRoute UpdateVnetRoute(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route) - { - return operations.UpdateVnetRouteAsync(resourceGroupName, name, vnetName, routeName, route).GetAwaiter().GetResult(); - } - - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetRouteAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetRouteWithHttpMessagesAsync(resourceGroupName, name, vnetName, routeName, route, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reboot a worker machine in an App Service plan. - /// - /// - /// Description for Reboot a worker machine in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of worker machine, which typically starts with RD. - /// - public static void RebootWorker(this IAppServicePlansOperations operations, string resourceGroupName, string name, string workerName) - { - operations.RebootWorkerAsync(resourceGroupName, name, workerName).GetAwaiter().GetResult(); - } - - /// - /// Reboot a worker machine in an App Service plan. - /// - /// - /// Description for Reboot a worker machine in an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of worker machine, which typically starts with RD. - /// - /// - /// The cancellation token. - /// - public static async Task RebootWorkerAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, string workerName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RebootWorkerWithHttpMessagesAsync(resourceGroupName, name, workerName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - public static AppServicePlan BeginCreateOrUpdate(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlan appServicePlan) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, appServicePlan).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IAppServicePlansOperations operations, string resourceGroupName, string name, AppServicePlan appServicePlan, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, appServicePlan, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a 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 IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in 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 IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in 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 IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebAppsByHybridConnectionNext(this IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListWebAppsByHybridConnectionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App Service - /// Plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsByHybridConnectionNextAsync(this IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsByHybridConnectionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHybridConnectionsNext(this IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListHybridConnectionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App Service - /// plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHybridConnectionsNextAsync(this IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHybridConnectionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebAppsNext(this IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListWebAppsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebAppsNextAsync(this IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebAppsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListUsagesNext(this IAppServicePlansOperations operations, string nextPageLink) - { - return operations.ListUsagesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesNextAsync(this IAppServicePlansOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs deleted file mode 100644 index de6c8f12dfda..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperations.cs +++ /dev/null @@ -1,687 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// CertificateOrdersDiagnosticsOperations operations. - /// - internal partial class CertificateOrdersDiagnosticsOperations : IServiceOperations, ICertificateOrdersDiagnosticsOperations - { - /// - /// Initializes a new instance of the CertificateOrdersDiagnosticsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal CertificateOrdersDiagnosticsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAppServiceCertificateOrderDetectorResponse", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Microsoft.CertificateRegistration call to get a detector response from App - /// Lens. - /// - /// - /// Description for Microsoft.CertificateRegistration call to get a detector - /// response from App Lens. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// The detector name which needs to be run. - /// - /// - /// The start time for detector response. - /// - /// - /// The end time for the detector response. - /// - /// - /// The time grain for the detector response. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (certificateOrderName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateOrderName"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("certificateOrderName", certificateOrderName); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppServiceCertificateOrderDetectorResponse", 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.CertificateRegistration/certificateOrders/{certificateOrderName}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{certificateOrderName}", System.Uri.EscapeDataString(certificateOrderName)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// 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>> ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(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, "ListAppServiceCertificateOrderDetectorResponseNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs deleted file mode 100644 index c9696717ab5a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateOrdersDiagnosticsOperationsExtensions.cs +++ /dev/null @@ -1,189 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for CertificateOrdersDiagnosticsOperations. - /// - public static partial class CertificateOrdersDiagnosticsOperationsExtensions - { - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - public static IPage ListAppServiceCertificateOrderDetectorResponse(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName) - { - return operations.ListAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName).GetAwaiter().GetResult(); - } - - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAppServiceCertificateOrderDetectorResponseAsync(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(resourceGroupName, certificateOrderName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Microsoft.CertificateRegistration call to get a detector response from App - /// Lens. - /// - /// - /// Description for Microsoft.CertificateRegistration call to get a detector - /// response from App Lens. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// The detector name which needs to be run. - /// - /// - /// The start time for detector response. - /// - /// - /// The end time for the detector response. - /// - /// - /// The time grain for the detector response. - /// - public static DetectorResponse GetAppServiceCertificateOrderDetectorResponse(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.GetAppServiceCertificateOrderDetectorResponseAsync(resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Microsoft.CertificateRegistration call to get a detector response from App - /// Lens. - /// - /// - /// Description for Microsoft.CertificateRegistration call to get a detector - /// response from App Lens. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// The detector name which needs to be run. - /// - /// - /// The start time for detector response. - /// - /// - /// The end time for the detector response. - /// - /// - /// The time grain for the detector response. - /// - /// - /// The cancellation token. - /// - public static async Task GetAppServiceCertificateOrderDetectorResponseAsync(this ICertificateOrdersDiagnosticsOperations operations, string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(resourceGroupName, certificateOrderName, detectorName, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAppServiceCertificateOrderDetectorResponseNext(this ICertificateOrdersDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListAppServiceCertificateOrderDetectorResponseNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Microsoft.CertificateRegistration to get the list of detectors for this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list of - /// detectors for this RP. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAppServiceCertificateOrderDetectorResponseNextAsync(this ICertificateOrdersDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperations.cs deleted file mode 100644 index 5055da1d1c6e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperations.cs +++ /dev/null @@ -1,400 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// CertificateRegistrationProviderOperations operations. - /// - internal partial class CertificateRegistrationProviderOperations : IServiceOperations, ICertificateRegistrationProviderOperations - { - /// - /// Initializes a new instance of the CertificateRegistrationProviderOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal CertificateRegistrationProviderOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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>> ListOperationsWithHttpMessagesAsync(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, "ListOperations", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.CertificateRegistration/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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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>> ListOperationsNextWithHttpMessagesAsync(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, "ListOperationsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperationsExtensions.cs deleted file mode 100644 index 81c8ff391cdb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificateRegistrationProviderOperationsExtensions.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for CertificateRegistrationProviderOperations. - /// - public static partial class CertificateRegistrationProviderOperationsExtensions - { - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListOperations(this ICertificateRegistrationProviderOperations operations) - { - return operations.ListOperationsAsync().GetAwaiter().GetResult(); - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsAsync(this ICertificateRegistrationProviderOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOperationsNext(this ICertificateRegistrationProviderOperations operations, string nextPageLink) - { - return operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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> ListOperationsNextAsync(this ICertificateRegistrationProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs deleted file mode 100644 index fea3e9de0871..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperations.cs +++ /dev/null @@ -1,1628 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// CertificatesOperations operations. - /// - internal partial class CertificatesOperations : IServiceOperations, ICertificatesOperations - { - /// - /// Initializes a new instance of the CertificatesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal CertificatesOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a subscription. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=KeyVaultId eq 'KeyVaultId' - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("filter", filter); - 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.Web/certificates").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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/certificates").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a certificate. - /// - /// - /// Description for Get a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Certificate certificateEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (certificateEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateEnvelope"); - } - if (certificateEnvelope != null) - { - certificateEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("certificateEnvelope", certificateEnvelope); - 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.Web/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(certificateEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a certificate. - /// - /// - /// Description for Delete a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, CertificatePatchResource certificateEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (certificateEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "certificateEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("certificateEnvelope", certificateEnvelope); - 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.Web/certificates/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(certificateEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(certificateEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs deleted file mode 100644 index 0b12b9a8b490..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/CertificatesOperationsExtensions.cs +++ /dev/null @@ -1,380 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for CertificatesOperations. - /// - public static partial class CertificatesOperationsExtensions - { - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=KeyVaultId eq 'KeyVaultId' - /// - public static IPage List(this ICertificatesOperations operations, string filter = default(string)) - { - return operations.ListAsync(filter).GetAwaiter().GetResult(); - } - - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=KeyVaultId eq 'KeyVaultId' - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ICertificatesOperations operations, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this ICertificatesOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this ICertificatesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a certificate. - /// - /// - /// Description for Get a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - public static Certificate Get(this ICertificatesOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get a certificate. - /// - /// - /// Description for Get a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ICertificatesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - public static Certificate CreateOrUpdate(this ICertificatesOperations operations, string resourceGroupName, string name, Certificate certificateEnvelope) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, certificateEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this ICertificatesOperations operations, string resourceGroupName, string name, Certificate certificateEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, certificateEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a certificate. - /// - /// - /// Description for Delete a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - public static void Delete(this ICertificatesOperations operations, string resourceGroupName, string name) - { - operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete a certificate. - /// - /// - /// Description for Delete a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this ICertificatesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - public static Certificate Update(this ICertificatesOperations operations, string resourceGroupName, string name, CertificatePatchResource certificateEnvelope) - { - return operations.UpdateAsync(resourceGroupName, name, certificateEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this ICertificatesOperations operations, string resourceGroupName, string name, CertificatePatchResource certificateEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, certificateEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ICertificatesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a 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 ICertificatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in 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 ICertificatesOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in 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 ICertificatesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs deleted file mode 100644 index 3c727f604129..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperations.cs +++ /dev/null @@ -1,1632 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// ContainerAppsOperations operations. - /// - internal partial class ContainerAppsOperations : IServiceOperations, IContainerAppsOperations - { - /// - /// Initializes a new instance of the ContainerAppsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ContainerAppsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get the Container Apps in a given subscription. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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, "ListBySubscription", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/containerApps").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the properties of a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/containerApps/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// List secrets for a container app - /// - /// - /// Name of the Container App. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSecretsWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - if (Client.ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.ApiVersion"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSecrets", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/containerApps/{name}/listSecrets").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (containerAppEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppEnvelope"); - } - if (containerAppEnvelope != null) - { - containerAppEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("containerAppEnvelope", containerAppEnvelope); - 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.Web/containerApps/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(containerAppEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(containerAppEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/containerApps/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get the Container Apps in a given 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the Container Apps in a given 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs deleted file mode 100644 index 3cb02207a4ed..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsOperationsExtensions.cs +++ /dev/null @@ -1,415 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ContainerAppsOperations. - /// - public static partial class ContainerAppsOperationsExtensions - { - /// - /// Get the Container Apps in a given subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListBySubscription(this IContainerAppsOperations operations) - { - return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); - } - - /// - /// Get the Container Apps in a given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this IContainerAppsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IContainerAppsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IContainerAppsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the properties of a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - public static ContainerApp Get(this IContainerAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the properties of a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - public static ContainerApp CreateOrUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - public static void Delete(this IContainerAppsOperations operations, string resourceGroupName, string name) - { - operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List secrets for a container app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the Container App. - /// - public static SecretsCollection ListSecrets(this IContainerAppsOperations operations, string name) - { - return operations.ListSecretsAsync(name).GetAwaiter().GetResult(); - } - - /// - /// List secrets for a container app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the Container App. - /// - /// - /// The cancellation token. - /// - public static async Task ListSecretsAsync(this IContainerAppsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSecretsWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - public static ContainerApp BeginCreateOrUpdate(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, containerAppEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, ContainerApp containerAppEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, containerAppEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - public static void BeginDelete(this IContainerAppsOperations operations, string resourceGroupName, string name) - { - operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IContainerAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get the Container Apps in a given subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySubscriptionNext(this IContainerAppsOperations operations, string nextPageLink) - { - return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the Container Apps in a given 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 IContainerAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IContainerAppsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the Container Apps in a given 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 IContainerAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs deleted file mode 100644 index 847186121165..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperations.cs +++ /dev/null @@ -1,1225 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// ContainerAppsRevisionsOperations operations. - /// - internal partial class ContainerAppsRevisionsOperations : IServiceOperations, IContainerAppsRevisionsOperations - { - /// - /// Initializes a new instance of the ContainerAppsRevisionsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ContainerAppsRevisionsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get the Revisions for a given Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App for which Revisions are needed. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListRevisionsWithHttpMessagesAsync(string resourceGroupName, string containerAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (containerAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("containerAppName", containerAppName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRevisions", 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.Web/containerApps/{containerAppName}/revisions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a revision of a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (containerAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("containerAppName", containerAppName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRevision", 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.Web/containerApps/{containerAppName}/revisions/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Activates a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to activate - /// - /// - /// 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 ActivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (containerAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("containerAppName", containerAppName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ActivateRevision", 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.Web/containerApps/{containerAppName}/revisions/{name}/activate").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deactivates a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to deactivate - /// - /// - /// 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 DeactivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (containerAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("containerAppName", containerAppName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeactivateRevision", 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.Web/containerApps/{containerAppName}/revisions/{name}/deactivate").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restarts a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to restart - /// - /// - /// 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 RestartRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (containerAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "containerAppName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("containerAppName", containerAppName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RestartRevision", 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.Web/containerApps/{containerAppName}/revisions/{name}/restart").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{containerAppName}", System.Uri.EscapeDataString(containerAppName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get the Revisions for a given Container App. - /// - /// - /// 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>> ListRevisionsNextWithHttpMessagesAsync(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, "ListRevisionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs deleted file mode 100644 index 0aa6713d80e6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ContainerAppsRevisionsOperationsExtensions.cs +++ /dev/null @@ -1,274 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ContainerAppsRevisionsOperations. - /// - public static partial class ContainerAppsRevisionsOperationsExtensions - { - /// - /// Get the Revisions for a given Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App for which Revisions are needed. - /// - public static IPage ListRevisions(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName) - { - return operations.ListRevisionsAsync(resourceGroupName, containerAppName).GetAwaiter().GetResult(); - } - - /// - /// Get the Revisions for a given Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App for which Revisions are needed. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRevisionsAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRevisionsWithHttpMessagesAsync(resourceGroupName, containerAppName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a revision of a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision. - /// - public static Revision GetRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) - { - return operations.GetRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); - } - - /// - /// Get a revision of a Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision. - /// - /// - /// The cancellation token. - /// - public static async Task GetRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Activates a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to activate - /// - public static void ActivateRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) - { - operations.ActivateRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); - } - - /// - /// Activates a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to activate - /// - /// - /// The cancellation token. - /// - public static async Task ActivateRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ActivateRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deactivates a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to deactivate - /// - public static void DeactivateRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) - { - operations.DeactivateRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); - } - - /// - /// Deactivates a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to deactivate - /// - /// - /// The cancellation token. - /// - public static async Task DeactivateRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeactivateRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restarts a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to restart - /// - public static void RestartRevision(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name) - { - operations.RestartRevisionAsync(resourceGroupName, containerAppName, name).GetAwaiter().GetResult(); - } - - /// - /// Restarts a revision for a Container App - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to restart - /// - /// - /// The cancellation token. - /// - public static async Task RestartRevisionAsync(this IContainerAppsRevisionsOperations operations, string resourceGroupName, string containerAppName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestartRevisionWithHttpMessagesAsync(resourceGroupName, containerAppName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get the Revisions for a given Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListRevisionsNext(this IContainerAppsRevisionsOperations operations, string nextPageLink) - { - return operations.ListRevisionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the Revisions for a given Container App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRevisionsNextAsync(this IContainerAppsRevisionsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRevisionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperations.cs deleted file mode 100644 index eaacc723b124..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperations.cs +++ /dev/null @@ -1,949 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// DeletedWebAppsOperations operations. - /// - internal partial class DeletedWebAppsOperations : IServiceOperations, IDeletedWebAppsOperations - { - /// - /// Initializes a new instance of the DeletedWebAppsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DeletedWebAppsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("location", location); - 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}/providers/Microsoft.Web/locations/{location}/deletedSites").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get deleted app for a subscription at location. - /// - /// - /// Description for Get deleted app for a subscription at location. - /// - /// - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDeletedWebAppByLocationWithHttpMessagesAsync(string location, string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (deletedSiteId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deletedSiteId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("location", location); - tracingParameters.Add("deletedSiteId", deletedSiteId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeletedWebAppByLocation", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/deletedSites/{deletedSiteId}").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - _url = _url.Replace("{deletedSiteId}", System.Uri.EscapeDataString(deletedSiteId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// 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>> ListByLocationNextWithHttpMessagesAsync(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, "ListByLocationNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperationsExtensions.cs deleted file mode 100644 index 91d04f1bf961..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DeletedWebAppsOperationsExtensions.cs +++ /dev/null @@ -1,221 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DeletedWebAppsOperations. - /// - public static partial class DeletedWebAppsOperationsExtensions - { - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IDeletedWebAppsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IDeletedWebAppsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// The operations group for this extension method. - /// - /// - /// - public static IPage ListByLocation(this IDeletedWebAppsOperations operations, string location) - { - return operations.ListByLocationAsync(location).GetAwaiter().GetResult(); - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// The operations group for this extension method. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task> ListByLocationAsync(this IDeletedWebAppsOperations operations, string location, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByLocationWithHttpMessagesAsync(location, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get deleted app for a subscription at location. - /// - /// - /// Description for Get deleted app for a subscription at location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - public static DeletedSite GetDeletedWebAppByLocation(this IDeletedWebAppsOperations operations, string location, string deletedSiteId) - { - return operations.GetDeletedWebAppByLocationAsync(location, deletedSiteId).GetAwaiter().GetResult(); - } - - /// - /// Get deleted app for a subscription at location. - /// - /// - /// Description for Get deleted app for a subscription at location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// The cancellation token. - /// - public static async Task GetDeletedWebAppByLocationAsync(this IDeletedWebAppsOperations operations, string location, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDeletedWebAppByLocationWithHttpMessagesAsync(location, deletedSiteId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IDeletedWebAppsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a 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 IDeletedWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByLocationNext(this IDeletedWebAppsOperations operations, string nextPageLink) - { - return operations.ListByLocationNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByLocationNextAsync(this IDeletedWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs deleted file mode 100644 index 4d5a18906798..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperations.cs +++ /dev/null @@ -1,6723 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// DiagnosticsOperations operations. - /// - internal partial class DiagnosticsOperations : IServiceOperations, IDiagnosticsOperations - { - /// - /// Initializes a new instance of the DiagnosticsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DiagnosticsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListHostingEnvironmentDetectorResponsesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostingEnvironmentDetectorResponses", 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.Web/hostingEnvironments/{name}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Hosting Environment Detector Response - /// - /// - /// Description for Get Hosting Environment Detector Response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// App Service Environment Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHostingEnvironmentDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string name, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHostingEnvironmentDetectorResponse", 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.Web/hostingEnvironments/{name}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteDetectorResponsesWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDetectorResponses", 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.Web/sites/{siteName}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDetectorResponse", 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.Web/sites/{siteName}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteDiagnosticCategoriesWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDiagnosticCategories", 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.Web/sites/{siteName}/diagnostics").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteDiagnosticCategoryWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDiagnosticCategory", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteAnalysesWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteAnalyses", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetSiteAnalysisWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (analysisName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "analysisName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("analysisName", analysisName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteAnalysis", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{analysisName}", System.Uri.EscapeDataString(analysisName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ExecuteSiteAnalysisWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (analysisName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "analysisName"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("analysisName", analysisName); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExecuteSiteAnalysis", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{analysisName}", System.Uri.EscapeDataString(analysisName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDetectors", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDetector", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ExecuteSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExecuteSiteDetector", 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.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteDetectorResponsesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDetectorResponsesSlot", 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.Web/sites/{siteName}/slots/{slot}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteDetectorResponseSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDetectorResponseSlot", 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.Web/sites/{siteName}/slots/{slot}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteDiagnosticCategoriesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDiagnosticCategoriesSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetSiteDiagnosticCategorySlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDiagnosticCategorySlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteAnalysesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteAnalysesSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// Slot - optional - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteAnalysisSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (analysisName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "analysisName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("analysisName", analysisName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteAnalysisSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{analysisName}", System.Uri.EscapeDataString(analysisName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ExecuteSiteAnalysisSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (analysisName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "analysisName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("analysisName", analysisName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExecuteSiteAnalysisSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{analysisName}", System.Uri.EscapeDataString(analysisName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteDetectorsSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// Slot Name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteDetectorSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ExecuteSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (detectorName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "detectorName"); - } - if (diagnosticCategory == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "diagnosticCategory"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (timeGrain != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(timeGrain, "PT[1-9][0-9]+[SMH]")) - { - throw new ValidationException(ValidationRules.Pattern, "timeGrain", "PT[1-9][0-9]+[SMH]"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("detectorName", detectorName); - tracingParameters.Add("diagnosticCategory", diagnosticCategory); - tracingParameters.Add("slot", slot); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("timeGrain", timeGrain); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ExecuteSiteDetectorSlot", 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.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{detectorName}", System.Uri.EscapeDataString(detectorName)); - _url = _url.Replace("{diagnosticCategory}", System.Uri.EscapeDataString(diagnosticCategory)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(startTime, Client.SerializationSettings).Trim('"')))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(endTime, Client.SerializationSettings).Trim('"')))); - } - if (timeGrain != null) - { - _queryParameters.Add(string.Format("timeGrain={0}", System.Uri.EscapeDataString(timeGrain))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// 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>> ListHostingEnvironmentDetectorResponsesNextWithHttpMessagesAsync(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, "ListHostingEnvironmentDetectorResponsesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// 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>> ListSiteDetectorResponsesNextWithHttpMessagesAsync(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, "ListSiteDetectorResponsesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// 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>> ListSiteDiagnosticCategoriesNextWithHttpMessagesAsync(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, "ListSiteDiagnosticCategoriesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// 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>> ListSiteAnalysesNextWithHttpMessagesAsync(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, "ListSiteAnalysesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// 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>> ListSiteDetectorsNextWithHttpMessagesAsync(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, "ListSiteDetectorsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// 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>> ListSiteDetectorResponsesSlotNextWithHttpMessagesAsync(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, "ListSiteDetectorResponsesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// 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>> ListSiteDiagnosticCategoriesSlotNextWithHttpMessagesAsync(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, "ListSiteDiagnosticCategoriesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// 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>> ListSiteAnalysesSlotNextWithHttpMessagesAsync(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, "ListSiteAnalysesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// 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>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(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, "ListSiteDetectorsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs deleted file mode 100644 index 730a96ac2198..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DiagnosticsOperationsExtensions.cs +++ /dev/null @@ -1,1733 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DiagnosticsOperations. - /// - public static partial class DiagnosticsOperationsExtensions - { - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - public static IPage ListHostingEnvironmentDetectorResponses(this IDiagnosticsOperations operations, string resourceGroupName, string name) - { - return operations.ListHostingEnvironmentDetectorResponsesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostingEnvironmentDetectorResponsesAsync(this IDiagnosticsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostingEnvironmentDetectorResponsesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Hosting Environment Detector Response - /// - /// - /// Description for Get Hosting Environment Detector Response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// App Service Environment Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DetectorResponse GetHostingEnvironmentDetectorResponse(this IDiagnosticsOperations operations, string resourceGroupName, string name, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.GetHostingEnvironmentDetectorResponseAsync(resourceGroupName, name, detectorName, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Get Hosting Environment Detector Response - /// - /// - /// Description for Get Hosting Environment Detector Response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// App Service Environment Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task GetHostingEnvironmentDetectorResponseAsync(this IDiagnosticsOperations operations, string resourceGroupName, string name, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHostingEnvironmentDetectorResponseWithHttpMessagesAsync(resourceGroupName, name, detectorName, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - public static IPage ListSiteDetectorResponses(this IDiagnosticsOperations operations, string resourceGroupName, string siteName) - { - return operations.ListSiteDetectorResponsesAsync(resourceGroupName, siteName).GetAwaiter().GetResult(); - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorResponsesAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorResponsesWithHttpMessagesAsync(resourceGroupName, siteName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DetectorResponse GetSiteDetectorResponse(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.GetSiteDetectorResponseAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDetectorResponseAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDetectorResponseWithHttpMessagesAsync(resourceGroupName, siteName, detectorName, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - public static IPage ListSiteDiagnosticCategories(this IDiagnosticsOperations operations, string resourceGroupName, string siteName) - { - return operations.ListSiteDiagnosticCategoriesAsync(resourceGroupName, siteName).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDiagnosticCategoriesAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDiagnosticCategoriesWithHttpMessagesAsync(resourceGroupName, siteName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - public static DiagnosticCategory GetSiteDiagnosticCategory(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory) - { - return operations.GetSiteDiagnosticCategoryAsync(resourceGroupName, siteName, diagnosticCategory).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDiagnosticCategoryAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDiagnosticCategoryWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - public static IPage ListSiteAnalyses(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory) - { - return operations.ListSiteAnalysesAsync(resourceGroupName, siteName, diagnosticCategory).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteAnalysesAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteAnalysesWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - public static AnalysisDefinition GetSiteAnalysis(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName) - { - return operations.GetSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteAnalysisAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteAnalysisWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DiagnosticAnalysis ExecuteSiteAnalysis(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.ExecuteSiteAnalysisAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task ExecuteSiteAnalysisAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExecuteSiteAnalysisWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - public static IPage ListSiteDetectors(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory) - { - return operations.ListSiteDetectorsAsync(resourceGroupName, siteName, diagnosticCategory).GetAwaiter().GetResult(); - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorsAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorsWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - public static DetectorDefinitionResource GetSiteDetector(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName) - { - return operations.GetSiteDetectorAsync(resourceGroupName, siteName, diagnosticCategory, detectorName).GetAwaiter().GetResult(); - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDetectorAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDetectorWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DiagnosticDetectorResponse ExecuteSiteDetector(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.ExecuteSiteDetectorAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task ExecuteSiteDetectorAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExecuteSiteDetectorWithHttpMessagesAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - public static IPage ListSiteDetectorResponsesSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string slot) - { - return operations.ListSiteDetectorResponsesSlotAsync(resourceGroupName, siteName, slot).GetAwaiter().GetResult(); - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorResponsesSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorResponsesSlotWithHttpMessagesAsync(resourceGroupName, siteName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DetectorResponse GetSiteDetectorResponseSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.GetSiteDetectorResponseSlotAsync(resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDetectorResponseSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDetectorResponseSlotWithHttpMessagesAsync(resourceGroupName, siteName, detectorName, slot, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - public static IPage ListSiteDiagnosticCategoriesSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string slot) - { - return operations.ListSiteDiagnosticCategoriesSlotAsync(resourceGroupName, siteName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDiagnosticCategoriesSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDiagnosticCategoriesSlotWithHttpMessagesAsync(resourceGroupName, siteName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - public static DiagnosticCategory GetSiteDiagnosticCategorySlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot) - { - return operations.GetSiteDiagnosticCategorySlotAsync(resourceGroupName, siteName, diagnosticCategory, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDiagnosticCategorySlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDiagnosticCategorySlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - public static IPage ListSiteAnalysesSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot) - { - return operations.ListSiteAnalysesSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteAnalysesSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteAnalysesSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// Slot - optional - /// - public static AnalysisDefinition GetSiteAnalysisSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot) - { - return operations.GetSiteAnalysisSlotAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// Slot - optional - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteAnalysisSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteAnalysisSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DiagnosticAnalysis ExecuteSiteAnalysisSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.ExecuteSiteAnalysisSlotAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task ExecuteSiteAnalysisSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExecuteSiteAnalysisSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, analysisName, slot, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - public static IPage ListSiteDetectorsSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot) - { - return operations.ListSiteDetectorsSlotAsync(resourceGroupName, siteName, diagnosticCategory, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorsSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorsSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// Slot Name - /// - public static DetectorDefinitionResource GetSiteDetectorSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot) - { - return operations.GetSiteDetectorSlotAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// Slot Name - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteDetectorSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteDetectorSlotWithHttpMessagesAsync(resourceGroupName, siteName, diagnosticCategory, detectorName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - public static DiagnosticDetectorResponse ExecuteSiteDetectorSlot(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string)) - { - return operations.ExecuteSiteDetectorSlotAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain).GetAwaiter().GetResult(); - } - - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// The cancellation token. - /// - public static async Task ExecuteSiteDetectorSlotAsync(this IDiagnosticsOperations operations, string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ExecuteSiteDetectorSlotWithHttpMessagesAsync(resourceGroupName, siteName, detectorName, diagnosticCategory, slot, startTime, endTime, timeGrain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHostingEnvironmentDetectorResponsesNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListHostingEnvironmentDetectorResponsesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostingEnvironmentDetectorResponsesNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostingEnvironmentDetectorResponsesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDetectorResponsesNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDetectorResponsesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorResponsesNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorResponsesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDiagnosticCategoriesNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDiagnosticCategoriesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDiagnosticCategoriesNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDiagnosticCategoriesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteAnalysesNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteAnalysesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteAnalysesNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteAnalysesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDetectorsNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDetectorsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorsNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDetectorResponsesSlotNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDetectorResponsesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorResponsesSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorResponsesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDiagnosticCategoriesSlotNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDiagnosticCategoriesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDiagnosticCategoriesSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDiagnosticCategoriesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteAnalysesSlotNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteAnalysesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteAnalysesSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteAnalysesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteDetectorsSlotNext(this IDiagnosticsOperations operations, string nextPageLink) - { - return operations.ListSiteDetectorsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteDetectorsSlotNextAsync(this IDiagnosticsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteDetectorsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperations.cs deleted file mode 100644 index 9a7c4a60ffde..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperations.cs +++ /dev/null @@ -1,400 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// DomainRegistrationProviderOperations operations. - /// - internal partial class DomainRegistrationProviderOperations : IServiceOperations, IDomainRegistrationProviderOperations - { - /// - /// Initializes a new instance of the DomainRegistrationProviderOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DomainRegistrationProviderOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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>> ListOperationsWithHttpMessagesAsync(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, "ListOperations", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.DomainRegistration/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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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>> ListOperationsNextWithHttpMessagesAsync(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, "ListOperationsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperationsExtensions.cs deleted file mode 100644 index 65da5aafe823..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainRegistrationProviderOperationsExtensions.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DomainRegistrationProviderOperations. - /// - public static partial class DomainRegistrationProviderOperationsExtensions - { - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListOperations(this IDomainRegistrationProviderOperations operations) - { - return operations.ListOperationsAsync().GetAwaiter().GetResult(); - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsAsync(this IDomainRegistrationProviderOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource provider - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOperationsNext(this IDomainRegistrationProviderOperations operations, string nextPageLink) - { - return operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Implements Csm operations Api to exposes the list of available Csm Apis - /// under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list of - /// available Csm Apis under the resource 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> ListOperationsNextAsync(this IDomainRegistrationProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs deleted file mode 100644 index 17ee3d661bef..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperations.cs +++ /dev/null @@ -1,4092 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// DomainsOperations operations. - /// - internal partial class DomainsOperations : IServiceOperations, IDomainsOperations - { - /// - /// Initializes a new instance of the DomainsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal DomainsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Check if a domain is available for registration. - /// - /// - /// Description for Check if a domain is available for registration. - /// - /// - /// Name of the domain. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CheckAvailabilityWithHttpMessagesAsync(NameIdentifier identifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (identifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "identifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("identifier", identifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckAvailability", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/checkDomainAvailability").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(identifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(identifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/domains").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Generate a single sign-on request for the domain management portal. - /// - /// - /// Description for Generate a single sign-on request for the domain management - /// portal. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetControlCenterSsoRequestWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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, "GetControlCenterSsoRequest", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/generateSsoRequest").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; - // 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// Search parameters for domain name recommendations. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListRecommendationsWithHttpMessagesAsync(DomainRecommendationSearchParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("parameters", parameters); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRecommendations", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/listDomainRecommendations").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.DomainRegistration/domains").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a domain. - /// - /// - /// Description for Get a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - 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.DomainRegistration/domains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string domainName, Domain domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, domainName, domain, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a domain. - /// - /// - /// Description for Delete a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Specify <code>true</code> to delete the domain immediately. The - /// default is <code>false</code> which deletes the domain after 24 - /// hours. - /// - /// - /// 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 domainName, bool? forceHardDeleteDomain = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("forceHardDeleteDomain", forceHardDeleteDomain); - 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.DomainRegistration/domains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (forceHardDeleteDomain != null) - { - _queryParameters.Add(string.Format("forceHardDeleteDomain={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceHardDeleteDomain, 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 (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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 domainName, DomainPatchResource domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (domainName != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(domainName, "[a-zA-Z0-9][a-zA-Z0-9\\.-]+")) - { - throw new ValidationException(ValidationRules.Pattern, "domainName", "[a-zA-Z0-9][a-zA-Z0-9\\.-]+"); - } - } - if (domain == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domain"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("domain", domain); - 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.DomainRegistration/domains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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(domain != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domain, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListOwnershipIdentifiers", 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.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get ownership identifier for domain - /// - /// - /// Description for Get ownership identifier for domain - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of 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> GetOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOwnershipIdentifier", 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.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateOwnershipIdentifier", 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.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete ownership identifier for domain - /// - /// - /// Description for Delete ownership identifier for domain - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// 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 DeleteOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteOwnershipIdentifier", 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.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("name", name); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateOwnershipIdentifier", 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.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Renew a domain. - /// - /// - /// Description for Renew a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// 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 RenewWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Renew", 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.DomainRegistration/domains/{domainName}/renew").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 && (int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Transfer out domain to another registrar - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> TransferOutWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "TransferOut", 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.DomainRegistration/domains/{domainName}/transferOut").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 != 200 && (int)_statusCode != 400) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 domainName, Domain domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (domainName != null) - { - if (!System.Text.RegularExpressions.Regex.IsMatch(domainName, "[a-zA-Z0-9][a-zA-Z0-9\\.-]+")) - { - throw new ValidationException(ValidationRules.Pattern, "domainName", "[a-zA-Z0-9][a-zA-Z0-9\\.-]+"); - } - } - if (domain == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domain"); - } - if (domain != null) - { - domain.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("domainName", domainName); - tracingParameters.Add("domain", domain); - 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.DomainRegistration/domains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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(domain != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domain, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// 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>> ListRecommendationsNextWithHttpMessagesAsync(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, "ListRecommendationsNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// 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>> ListOwnershipIdentifiersNextWithHttpMessagesAsync(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, "ListOwnershipIdentifiersNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs deleted file mode 100644 index 4781006c0b42..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/DomainsOperationsExtensions.cs +++ /dev/null @@ -1,984 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for DomainsOperations. - /// - public static partial class DomainsOperationsExtensions - { - /// - /// Check if a domain is available for registration. - /// - /// - /// Description for Check if a domain is available for registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the domain. - /// - public static DomainAvailabilityCheckResult CheckAvailability(this IDomainsOperations operations, NameIdentifier identifier) - { - return operations.CheckAvailabilityAsync(identifier).GetAwaiter().GetResult(); - } - - /// - /// Check if a domain is available for registration. - /// - /// - /// Description for Check if a domain is available for registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the domain. - /// - /// - /// The cancellation token. - /// - public static async Task CheckAvailabilityAsync(this IDomainsOperations operations, NameIdentifier identifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckAvailabilityWithHttpMessagesAsync(identifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IDomainsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IDomainsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Generate a single sign-on request for the domain management portal. - /// - /// - /// Description for Generate a single sign-on request for the domain management - /// portal. - /// - /// - /// The operations group for this extension method. - /// - public static DomainControlCenterSsoRequest GetControlCenterSsoRequest(this IDomainsOperations operations) - { - return operations.GetControlCenterSsoRequestAsync().GetAwaiter().GetResult(); - } - - /// - /// Generate a single sign-on request for the domain management portal. - /// - /// - /// Description for Generate a single sign-on request for the domain management - /// portal. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task GetControlCenterSsoRequestAsync(this IDomainsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetControlCenterSsoRequestWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Search parameters for domain name recommendations. - /// - public static IPage ListRecommendations(this IDomainsOperations operations, DomainRecommendationSearchParameters parameters) - { - return operations.ListRecommendationsAsync(parameters).GetAwaiter().GetResult(); - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Search parameters for domain name recommendations. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendationsAsync(this IDomainsOperations operations, DomainRecommendationSearchParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendationsWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IDomainsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IDomainsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a domain. - /// - /// - /// Description for Get a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - public static Domain Get(this IDomainsOperations operations, string resourceGroupName, string domainName) - { - return operations.GetAsync(resourceGroupName, domainName).GetAwaiter().GetResult(); - } - - /// - /// Get a domain. - /// - /// - /// Description for Get a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - public static Domain CreateOrUpdate(this IDomainsOperations operations, string resourceGroupName, string domainName, Domain domain) - { - return operations.CreateOrUpdateAsync(resourceGroupName, domainName, domain).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, Domain domain, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, domainName, domain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a domain. - /// - /// - /// Description for Delete a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Specify <code>true</code> to delete the domain immediately. The - /// default is <code>false</code> which deletes the domain after 24 - /// hours. - /// - public static void Delete(this IDomainsOperations operations, string resourceGroupName, string domainName, bool? forceHardDeleteDomain = default(bool?)) - { - operations.DeleteAsync(resourceGroupName, domainName, forceHardDeleteDomain).GetAwaiter().GetResult(); - } - - /// - /// Delete a domain. - /// - /// - /// Description for Delete a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Specify <code>true</code> to delete the domain immediately. The - /// default is <code>false</code> which deletes the domain after 24 - /// hours. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, bool? forceHardDeleteDomain = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, domainName, forceHardDeleteDomain, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - public static Domain Update(this IDomainsOperations operations, string resourceGroupName, string domainName, DomainPatchResource domain) - { - return operations.UpdateAsync(resourceGroupName, domainName, domain).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, DomainPatchResource domain, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, domainName, domain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - public static IPage ListOwnershipIdentifiers(this IDomainsOperations operations, string resourceGroupName, string domainName) - { - return operations.ListOwnershipIdentifiersAsync(resourceGroupName, domainName).GetAwaiter().GetResult(); - } - - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOwnershipIdentifiersAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOwnershipIdentifiersWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get ownership identifier for domain - /// - /// - /// Description for Get ownership identifier for domain - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - public static DomainOwnershipIdentifier GetOwnershipIdentifier(this IDomainsOperations operations, string resourceGroupName, string domainName, string name) - { - return operations.GetOwnershipIdentifierAsync(resourceGroupName, domainName, name).GetAwaiter().GetResult(); - } - - /// - /// Get ownership identifier for domain - /// - /// - /// Description for Get ownership identifier for domain - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// The cancellation token. - /// - public static async Task GetOwnershipIdentifierAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, domainName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - public static DomainOwnershipIdentifier CreateOrUpdateOwnershipIdentifier(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier) - { - return operations.CreateOrUpdateOwnershipIdentifierAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).GetAwaiter().GetResult(); - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateOwnershipIdentifierAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete ownership identifier for domain - /// - /// - /// Description for Delete ownership identifier for domain - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - public static void DeleteOwnershipIdentifier(this IDomainsOperations operations, string resourceGroupName, string domainName, string name) - { - operations.DeleteOwnershipIdentifierAsync(resourceGroupName, domainName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete ownership identifier for domain - /// - /// - /// Description for Delete ownership identifier for domain - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteOwnershipIdentifierAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, domainName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - public static DomainOwnershipIdentifier UpdateOwnershipIdentifier(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier) - { - return operations.UpdateOwnershipIdentifierAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier).GetAwaiter().GetResult(); - } - - /// - /// Creates an ownership identifier for a domain or updates identifier details - /// for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or updates - /// identifier details for an existing identifier - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateOwnershipIdentifierAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, domainName, name, domainOwnershipIdentifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Renew a domain. - /// - /// - /// Description for Renew a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - public static void Renew(this IDomainsOperations operations, string resourceGroupName, string domainName) - { - operations.RenewAsync(resourceGroupName, domainName).GetAwaiter().GetResult(); - } - - /// - /// Renew a domain. - /// - /// - /// Description for Renew a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// The cancellation token. - /// - public static async Task RenewAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RenewWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Transfer out domain to another registrar - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - public static Domain TransferOut(this IDomainsOperations operations, string resourceGroupName, string domainName) - { - return operations.TransferOutAsync(resourceGroupName, domainName).GetAwaiter().GetResult(); - } - - /// - /// Transfer out domain to another registrar - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// The cancellation token. - /// - public static async Task TransferOutAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.TransferOutWithHttpMessagesAsync(resourceGroupName, domainName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - public static Domain BeginCreateOrUpdate(this IDomainsOperations operations, string resourceGroupName, string domainName, Domain domain) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, domainName, domain).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IDomainsOperations operations, string resourceGroupName, string domainName, Domain domain, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, domainName, domain, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IDomainsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a 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 IDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListRecommendationsNext(this IDomainsOperations operations, string nextPageLink) - { - return operations.ListRecommendationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendationsNextAsync(this IDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in 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 IDomainsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in 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 IDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOwnershipIdentifiersNext(this IDomainsOperations operations, string nextPageLink) - { - return operations.ListOwnershipIdentifiersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOwnershipIdentifiersNextAsync(this IDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOwnershipIdentifiersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs deleted file mode 100644 index 4e9e2829d289..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperations.cs +++ /dev/null @@ -1,597 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// GlobalModelOperations operations. - /// - internal partial class GlobalModelOperations : IServiceOperations, IGlobalModelOperations - { - /// - /// Initializes a new instance of the GlobalModelOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal GlobalModelOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get deleted app for a subscription. - /// - /// - /// Description for Get deleted app for a subscription. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDeletedWebAppWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (deletedSiteId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deletedSiteId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("deletedSiteId", deletedSiteId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeletedWebApp", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}").ToString(); - _url = _url.Replace("{deletedSiteId}", System.Uri.EscapeDataString(deletedSiteId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetDeletedWebAppSnapshotsWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (deletedSiteId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deletedSiteId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("deletedSiteId", deletedSiteId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeletedWebAppSnapshots", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deletedSites/{deletedSiteId}/snapshots").ToString(); - _url = _url.Replace("{deletedSiteId}", System.Uri.EscapeDataString(deletedSiteId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 an operation in a subscription and given region - /// - /// - /// Description for Gets an operation in a subscription and given region - /// - /// - /// Location name - /// - /// - /// Operation Id - /// - /// - /// 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 GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("location", location); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSubscriptionOperationWithAsyncResponse", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/operations/{operationId}").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - _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 != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs deleted file mode 100644 index f9234d348ca7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/GlobalModelOperationsExtensions.cs +++ /dev/null @@ -1,150 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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 GlobalModelOperations. - /// - public static partial class GlobalModelOperationsExtensions - { - /// - /// Get deleted app for a subscription. - /// - /// - /// Description for Get deleted app for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - public static DeletedSite GetDeletedWebApp(this IGlobalModelOperations operations, string deletedSiteId) - { - return operations.GetDeletedWebAppAsync(deletedSiteId).GetAwaiter().GetResult(); - } - - /// - /// Get deleted app for a subscription. - /// - /// - /// Description for Get deleted app for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// The cancellation token. - /// - public static async Task GetDeletedWebAppAsync(this IGlobalModelOperations operations, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDeletedWebAppWithHttpMessagesAsync(deletedSiteId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - public static IList GetDeletedWebAppSnapshots(this IGlobalModelOperations operations, string deletedSiteId) - { - return operations.GetDeletedWebAppSnapshotsAsync(deletedSiteId).GetAwaiter().GetResult(); - } - - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// The cancellation token. - /// - public static async Task> GetDeletedWebAppSnapshotsAsync(this IGlobalModelOperations operations, string deletedSiteId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDeletedWebAppSnapshotsWithHttpMessagesAsync(deletedSiteId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an operation in a subscription and given region - /// - /// - /// Description for Gets an operation in a subscription and given region - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location name - /// - /// - /// Operation Id - /// - public static void GetSubscriptionOperationWithAsyncResponse(this IGlobalModelOperations operations, string location, string operationId) - { - operations.GetSubscriptionOperationWithAsyncResponseAsync(location, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets an operation in a subscription and given region - /// - /// - /// Description for Gets an operation in a subscription and given region - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location name - /// - /// - /// Operation Id - /// - /// - /// The cancellation token. - /// - public static async Task GetSubscriptionOperationWithAsyncResponseAsync(this IGlobalModelOperations operations, string location, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(location, operationId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs deleted file mode 100644 index 7073513eefc5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceCertificateOrdersOperations.cs +++ /dev/null @@ -1,750 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// AppServiceCertificateOrdersOperations operations. - /// - public partial interface IAppServiceCertificateOrdersOperations - { - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a 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)); - /// - /// Validate information for a certificate order. - /// - /// - /// Description for Validate information for a certificate order. - /// - /// - /// Information for a certificate order. - /// - /// - /// 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 ValidatePurchaseInformationWithHttpMessagesAsync(AppServiceCertificateOrder appServiceCertificateOrder, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a certificate order. - /// - /// - /// Description for Get a certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order.. - /// - /// - /// 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 certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// 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 certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an existing certificate order. - /// - /// - /// Description for Delete an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// 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 certificateOrderName, AppServiceCertificateOrderPatchResource certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate - /// order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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>> ListCertificatesWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the certificate associated with a certificate order. - /// - /// - /// Description for Get the certificate associated with a certificate - /// order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a certificate and associates with key vault - /// secret. - /// - /// - /// Description for Creates or updates a certificate and associates - /// with key vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// 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> CreateOrUpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete the certificate associated with a certificate order. - /// - /// - /// Description for Delete the certificate associated with a - /// certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a certificate and associates with key vault - /// secret. - /// - /// - /// Description for Creates or updates a certificate and associates - /// with key vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// 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> UpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificatePatchResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reissue an existing certificate order. - /// - /// - /// Description for Reissue an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Parameters for the reissue. - /// - /// - /// 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 ReissueWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, ReissueCertificateOrderRequest reissueCertificateOrderRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Renew an existing certificate order. - /// - /// - /// Description for Renew an existing certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Renew 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 RenewWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, RenewCertificateOrderRequest renewCertificateOrderRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resend certificate email. - /// - /// - /// Description for Resend certificate email. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 ResendEmailWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resend domain verification email to customer for this certificate - /// order - /// - /// - /// Resend domain verification ownership email containing steps on how - /// to verify a domain for a given certificate order - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Email address - /// - /// - /// 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 ResendRequestEmailsWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, NameIdentifier nameIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// This method is used to obtain the site seal information for an - /// issued certificate. - /// - /// - /// This method is used to obtain the site seal information for an - /// issued certificate. A site seal is a graphic that the certificate - /// purchaser can embed on their web site to show their visitors - /// information about their SSL certificate. If a web site visitor - /// clicks on the site seal image, a pop-up page is displayed that - /// contains detailed information about the SSL certificate. The site - /// seal token is used to link the site seal graphic image to the - /// appropriate certificate details pop-up page display when a user - /// clicks on the site seal. The site seal images are expected to be - /// static images and hosted by the reseller, to minimize delays for - /// customer page load times. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Site seal request. - /// - /// - /// 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> RetrieveSiteSealWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, SiteSealRequest siteSealRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Verify domain ownership for this certificate order. - /// - /// - /// Description for Verify domain ownership for this certificate order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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 VerifyDomainOwnershipWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieve the list of certificate actions. - /// - /// - /// Description for Retrieve the list of certificate actions. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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>> RetrieveCertificateActionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieve email history. - /// - /// - /// Description for Retrieve email history. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// 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>> RetrieveCertificateEmailHistoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a certificate purchase order. - /// - /// - /// Description for Create or update a certificate purchase order. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Distinguished name to use for the certificate order. - /// - /// - /// 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 certificateOrderName, AppServiceCertificateOrder certificateDistinguishedName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a certificate and associates with key vault - /// secret. - /// - /// - /// Description for Creates or updates a certificate and associates - /// with key vault secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate order. - /// - /// - /// Name of the certificate. - /// - /// - /// Key vault certificate resource Id. - /// - /// - /// 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> BeginCreateOrUpdateCertificateWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string name, AppServiceCertificateResource keyVaultCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all certificate orders in a subscription. - /// - /// - /// Description for List all certificate orders in a 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)); - /// - /// Get certificate orders in a resource group. - /// - /// - /// Description for Get certificate orders in 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)); - /// - /// List all certificates associated with a certificate order. - /// - /// - /// Description for List all certificates associated with a certificate - /// order. - /// - /// - /// 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>> ListCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs deleted file mode 100644 index 4afcf71a451e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServiceEnvironmentsOperations.cs +++ /dev/null @@ -1,2250 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// AppServiceEnvironmentsOperations operations. - /// - public partial interface IAppServiceEnvironmentsOperations - { - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a - /// 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)); - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in a resource - /// group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the properties of an App Service Environment. - /// - /// - /// Description for Get the properties of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// 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 name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if - /// the App Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// 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 name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// 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 name, AppServiceEnvironmentPatchResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity - /// an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListCapacitiesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get IP addresses assigned to an App Service Environment. - /// - /// - /// Description for Get IP addresses assigned to an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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> GetVipInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different - /// VNET. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// 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>> ChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get networking configuration of an App Service Environment - /// - /// - /// Description for Get networking configuration of an App Service - /// Environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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> GetAseV3NetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update networking configuration of an App Service Environment - /// - /// - /// Description for Update networking configuration of an App Service - /// Environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// 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> UpdateAseNetworkingConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, AseV3NetworkingConfiguration aseNetworkingConfiguration, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get diagnostic information for an App Service Environment. - /// - /// - /// Description for Get diagnostic information for an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListDiagnosticsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a diagnostics item for an App Service Environment. - /// - /// - /// Description for Get a diagnostics item for an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the diagnostics item. - /// - /// - /// 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> GetDiagnosticsItemWithHttpMessagesAsync(string resourceGroupName, string name, string diagnosticsName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the network endpoints of all inbound dependencies of an App - /// Service Environment. - /// - /// - /// Description for Get the network endpoints of all inbound - /// dependencies of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> GetInboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListMultiRolePoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get properties of a multi-role pool. - /// - /// - /// Description for Get properties of a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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> GetMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// 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> CreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// 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> UpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a specific instance of a multi-role pool - /// of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the instance in the multi-role pool. - /// - /// - /// 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>> ListMultiRolePoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a multi-role pool of an App Service - /// Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an - /// App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListMultiRoleMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListMultiRolePoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListMultiRoleUsagesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all currently running operations on the App Service - /// Environment. - /// - /// - /// Description for List all currently running operations on the App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListOperationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the network endpoints of all outbound dependencies of an App - /// Service Environment. - /// - /// - /// Description for Get the network endpoints of all outbound - /// dependencies of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> GetOutboundNetworkDependenciesEndpointsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoints associated with a hosting - /// environment - /// - /// - /// Description for Gets the list of private endpoints associated with - /// a hosting environment - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// 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> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// 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> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reboot all machines in an App Service Environment. - /// - /// - /// Description for Reboot all machines in an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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 RebootWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListAppServicePlansWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Comma separated list of app properties to include. - /// - /// - /// 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>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string propertiesToInclude = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> SuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service - /// Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms - /// to odata syntax. Example: $filter=(name.value eq 'Metric1' or - /// name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> ListWorkerPoolsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get properties of a worker pool. - /// - /// - /// Description for Get properties of a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// 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> GetWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// 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> CreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// 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> UpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a specific instance of a worker pool of - /// an App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// worker pool of an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Name of the instance in the worker pool. - /// - /// - /// 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>> ListWorkerPoolInstanceMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, string instance, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// 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>> ListWebWorkerMetricDefinitionsWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// 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>> ListWorkerPoolSkusWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App - /// Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// 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>> ListWebWorkerUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update an App Service Environment. - /// - /// - /// Description for Create or update an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Configuration details of the App Service Environment. - /// - /// - /// 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 name, AppServiceEnvironmentResource hostingEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an App Service Environment. - /// - /// - /// Description for Delete an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Specify <code>true</code> to force the deletion even if - /// the App Service Environment contains resources. The default is - /// <code>false</code>. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, bool? forceDelete = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different - /// VNET. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Details for the new virtual network. - /// - /// - /// 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>> BeginChangeVnetWithHttpMessagesAsync(string resourceGroupName, string name, VirtualNetworkProfile vnetInfo, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a multi-role pool. - /// - /// - /// Description for Create or update a multi-role pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Properties of the multi-role pool. - /// - /// - /// 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> BeginCreateOrUpdateMultiRolePoolWithHttpMessagesAsync(string resourceGroupName, string name, WorkerPoolResource multiRolePoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// - /// - /// 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// - /// - /// 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> BeginResumeWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// 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>> BeginSuspendWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a worker pool. - /// - /// - /// Description for Create or update a worker pool. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service Environment. - /// - /// - /// Name of the worker pool. - /// - /// - /// Properties of the worker pool. - /// - /// - /// 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> BeginCreateOrUpdateWorkerPoolWithHttpMessagesAsync(string resourceGroupName, string name, string workerPoolName, WorkerPoolResource workerPoolEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all App Service Environments for a subscription. - /// - /// - /// Description for Get all App Service Environments for a - /// 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)); - /// - /// Get all App Service Environments in a resource group. - /// - /// - /// Description for Get all App Service Environments in 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)); - /// - /// Get the used, available, and total worker capacity an App Service - /// Environment. - /// - /// - /// Description for Get the used, available, and total worker capacity - /// an App Service Environment. - /// - /// - /// 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>> ListCapacitiesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different - /// VNET. - /// - /// - /// 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>> ChangeVnetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the network endpoints of all inbound dependencies of an App - /// Service Environment. - /// - /// - /// Description for Get the network endpoints of all inbound - /// dependencies of an App Service Environment. - /// - /// - /// 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>> GetInboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all multi-role pools. - /// - /// - /// Description for Get all multi-role pools. - /// - /// - /// 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>> ListMultiRolePoolsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a specific instance of a multi-role pool - /// of an App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// multi-role pool of an App Service Environment. - /// - /// - /// 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>> ListMultiRolePoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a multi-role pool of an App Service - /// Environment. - /// - /// - /// Description for Get metric definitions for a multi-role pool of an - /// App Service Environment. - /// - /// - /// 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>> ListMultiRoleMetricDefinitionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available SKUs for scaling a multi-role pool. - /// - /// - /// Description for Get available SKUs for scaling a multi-role pool. - /// - /// - /// 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>> ListMultiRolePoolSkusNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get usage metrics for a multi-role pool of an App Service - /// Environment. - /// - /// - /// Description for Get usage metrics for a multi-role pool of an App - /// Service Environment. - /// - /// - /// 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>> ListMultiRoleUsagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the network endpoints of all outbound dependencies of an App - /// Service Environment. - /// - /// - /// Description for Get the network endpoints of all outbound - /// dependencies of an App Service Environment. - /// - /// - /// 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>> GetOutboundNetworkDependenciesEndpointsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoints associated with a hosting - /// environment - /// - /// - /// Description for Gets the list of private endpoints associated with - /// a hosting environment - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// 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>> ResumeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all App Service plans in an App Service Environment. - /// - /// - /// Description for Get all App Service plans in an App Service - /// Environment. - /// - /// - /// 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>> ListAppServicePlansNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps in an App Service Environment. - /// - /// - /// Description for Get all apps in an App Service Environment. - /// - /// - /// 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>> ListWebAppsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// 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>> SuspendNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get global usage metrics of an App Service Environment. - /// - /// - /// Description for Get global usage metrics of an App Service - /// Environment. - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all worker pools of an App Service Environment. - /// - /// - /// Description for Get all worker pools of an App Service Environment. - /// - /// - /// 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>> ListWorkerPoolsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a specific instance of a worker pool of - /// an App Service Environment. - /// - /// - /// Description for Get metric definitions for a specific instance of a - /// worker pool of an App Service Environment. - /// - /// - /// 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>> ListWorkerPoolInstanceMetricDefinitionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get metric definitions for a worker pool of an App Service - /// Environment. - /// - /// - /// Description for Get metric definitions for a worker pool of an App - /// Service Environment. - /// - /// - /// 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>> ListWebWorkerMetricDefinitionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available SKUs for scaling a worker pool. - /// - /// - /// Description for Get available SKUs for scaling a worker pool. - /// - /// - /// 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>> ListWorkerPoolSkusNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get usage metrics for a worker pool of an App Service Environment. - /// - /// - /// Description for Get usage metrics for a worker pool of an App - /// Service Environment. - /// - /// - /// 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>> ListWebWorkerUsagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Move an App Service Environment to a different VNET. - /// - /// - /// Description for Move an App Service Environment to a different - /// VNET. - /// - /// - /// 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>> BeginChangeVnetNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resume an App Service Environment. - /// - /// - /// Description for Resume an App Service Environment. - /// - /// - /// 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>> BeginResumeNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Suspend an App Service Environment. - /// - /// - /// Description for Suspend an App Service Environment. - /// - /// - /// 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>> BeginSuspendNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs deleted file mode 100644 index ad73ce55fad4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IAppServicePlansOperations.cs +++ /dev/null @@ -1,1071 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// AppServicePlansOperations operations. - /// - public partial interface IAppServicePlansOperations - { - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a subscription. - /// - /// - /// Specify <code>true</code> to return all App Service - /// plan properties. The default is <code>false</code>, - /// which returns a subset of the properties. - /// Retrieval of all properties may increase the API latency. - /// - /// - /// 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(bool? detailed = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get an App Service plan. - /// - /// - /// Description for Get an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// 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 name, AppServicePlan appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete an App Service plan. - /// - /// - /// Description for Delete an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// 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 name, AppServicePlanPatchResource appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all capabilities of an App Service plan. - /// - /// - /// Description for List all capabilities of an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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>> ListCapabilitiesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieve a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Retrieve a Hybrid Connection in use in an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// 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> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Hybrid Connection in use in an App Service plan. - /// - /// - /// Description for Delete a Hybrid Connection in use in an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Service Bus namespace. - /// - /// - /// Name of the Service Bus relay. - /// - /// - /// 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 DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the send key name and value of a Hybrid Connection. - /// - /// - /// Description for Get the send key name and value of a Hybrid - /// Connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// The name of the Service Bus namespace. - /// - /// - /// The name of the Service Bus relay. - /// - /// - /// 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> ListHybridConnectionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App - /// Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Hybrid Connection namespace. - /// - /// - /// Name of the Hybrid Connection relay. - /// - /// - /// 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>> ListWebAppsByHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the maximum number of Hybrid Connections allowed in an App - /// Service plan. - /// - /// - /// Description for Get the maximum number of Hybrid Connections - /// allowed in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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> GetHybridConnectionPlanLimitWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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>> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restart all apps in an App Service plan. - /// - /// - /// Description for Restart all apps in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Specify <code>true</code> to perform a soft restart, - /// applies the configuration settings and restarts the apps if - /// necessary. The default is <code>false</code>, which - /// always restarts and reprovisions the apps - /// - /// - /// 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 RestartWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Skip to a web app in the list of webapps associated with app - /// service plan. If specified, the resulting list will contain web - /// apps starting from (including) the skipToken. Otherwise, the - /// resulting list contains web apps from the start of the list - /// - /// - /// Supported filter: $filter=state eq running. Returns only web apps - /// that are currently running - /// - /// - /// List page size. If specified, results are paged. - /// - /// - /// 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>> ListWebAppsWithHttpMessagesAsync(string resourceGroupName, string name, string skipToken = default(string), string filter = default(string), string top = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all selectable SKUs for a given App Service Plan - /// - /// - /// Description for Gets all selectable SKUs for a given App Service - /// Plan - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// 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> GetServerFarmSkusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of App Service Plan - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms - /// to odata syntax. Example: $filter=(name.value eq 'Metric1' or - /// name.value eq 'Metric2'). - /// - /// - /// 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all Virtual Networks associated with an App Service plan. - /// - /// - /// Description for Get all Virtual Networks associated with an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// 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>> ListVnetsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Virtual Network associated with an App Service plan. - /// - /// - /// Description for Get a Virtual Network associated with an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// 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> GetVnetFromServerFarmWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Virtual Network gateway. - /// - /// - /// Description for Get a Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// 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> GetVnetGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update a Virtual Network gateway. - /// - /// - /// Description for Update a Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Only the 'primary' gateway is supported. - /// - /// - /// Definition of the gateway. - /// - /// - /// 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> UpdateVnetGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all routes that are associated with a Virtual Network in an App - /// Service plan. - /// - /// - /// Description for Get all routes that are associated with a Virtual - /// Network in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// 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>> ListRoutesForVnetWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a Virtual Network route in an App Service plan. - /// - /// - /// Description for Get a Virtual Network route in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// 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>> GetRouteForVnetWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// 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> CreateOrUpdateVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Virtual Network route in an App Service plan. - /// - /// - /// Description for Delete a Virtual Network route in an App Service - /// plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// 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 DeleteVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a Virtual Network route in an App Service plan. - /// - /// - /// Description for Create or update a Virtual Network route in an App - /// Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the Virtual Network route. - /// - /// - /// Definition of the Virtual Network route. - /// - /// - /// 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> UpdateVnetRouteWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string routeName, VnetRoute route, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reboot a worker machine in an App Service plan. - /// - /// - /// Description for Reboot a worker machine in an App Service plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Name of worker machine, which typically starts with RD. - /// - /// - /// 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 RebootWorkerWithHttpMessagesAsync(string resourceGroupName, string name, string workerName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates an App Service Plan. - /// - /// - /// Description for Creates or updates an App Service Plan. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the App Service plan. - /// - /// - /// Details of the App Service plan. - /// - /// - /// 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 name, AppServicePlan appServicePlan, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all App Service plans for a subscription. - /// - /// - /// Description for Get all App Service plans for a 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)); - /// - /// Get all App Service plans in a resource group. - /// - /// - /// Description for Get all App Service plans in 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)); - /// - /// Get all apps that use a Hybrid Connection in an App Service Plan. - /// - /// - /// Description for Get all apps that use a Hybrid Connection in an App - /// Service Plan. - /// - /// - /// 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>> ListWebAppsByHybridConnectionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieve all Hybrid Connections in use in an App Service plan. - /// - /// - /// Description for Retrieve all Hybrid Connections in use in an App - /// Service plan. - /// - /// - /// 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>> ListHybridConnectionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps associated with an App Service plan. - /// - /// - /// Description for Get all apps associated with an App Service plan. - /// - /// - /// 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>> ListWebAppsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets server farm usage information - /// - /// - /// Description for Gets server farm usage information - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs deleted file mode 100644 index 27a71c5b91d6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateOrdersDiagnosticsOperations.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// CertificateOrdersDiagnosticsOperations operations. - /// - public partial interface ICertificateOrdersDiagnosticsOperations - { - /// - /// Microsoft.CertificateRegistration to get the list of detectors for - /// this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list - /// of detectors for this RP. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// 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>> ListAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Microsoft.CertificateRegistration call to get a detector response - /// from App Lens. - /// - /// - /// Description for Microsoft.CertificateRegistration call to get a - /// detector response from App Lens. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The certificate order name for which the response is needed. - /// - /// - /// The detector name which needs to be run. - /// - /// - /// The start time for detector response. - /// - /// - /// The end time for the detector response. - /// - /// - /// The time grain for the detector response. - /// - /// - /// 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> GetAppServiceCertificateOrderDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string certificateOrderName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Microsoft.CertificateRegistration to get the list of detectors for - /// this RP. - /// - /// - /// Description for Microsoft.CertificateRegistration to get the list - /// of detectors for this RP. - /// - /// - /// 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>> ListAppServiceCertificateOrderDetectorResponseNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateRegistrationProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateRegistrationProviderOperations.cs deleted file mode 100644 index 64a54e2213c6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificateRegistrationProviderOperations.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// CertificateRegistrationProviderOperations operations. - /// - public partial interface ICertificateRegistrationProviderOperations - { - /// - /// Implements Csm operations Api to exposes the list of available Csm - /// Apis under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list - /// of available Csm Apis under the resource 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>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Implements Csm operations Api to exposes the list of available Csm - /// Apis under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list - /// of available Csm Apis under the resource 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>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs deleted file mode 100644 index 86f6dcfa701d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ICertificatesOperations.cs +++ /dev/null @@ -1,243 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// CertificatesOperations operations. - /// - public partial interface ICertificatesOperations - { - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a subscription. - /// - /// - /// Return only information specified in the filter (using OData - /// syntax). For example: $filter=KeyVaultId eq 'KeyVaultId' - /// - /// - /// 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 filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a certificate. - /// - /// - /// Description for Get a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// 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 name, Certificate certificateEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a certificate. - /// - /// - /// Description for Delete a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a certificate. - /// - /// - /// Description for Create or update a certificate. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the certificate. - /// - /// - /// Details of certificate, if it exists already. - /// - /// - /// 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 name, CertificatePatchResource certificateEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all certificates for a subscription. - /// - /// - /// Description for Get all certificates for a 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)); - /// - /// Get all certificates in a resource group. - /// - /// - /// Description for Get all certificates in 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)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs deleted file mode 100644 index 74cc890d9306..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsOperations.cs +++ /dev/null @@ -1,269 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ContainerAppsOperations operations. - /// - public partial interface IContainerAppsOperations - { - /// - /// Get the Container Apps in a given subscription. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the properties of a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// 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 name, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List secrets for a container app - /// - /// - /// Name of the Container App. - /// - /// - /// 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> ListSecretsWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create or update a Container App. - /// - /// - /// Description for Create or update a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// - /// - /// 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 name, ContainerApp containerAppEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Container App. - /// - /// - /// Description for Delete a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the Container Apps in a given 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)); - /// - /// Get the Container Apps in a given resource group. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs deleted file mode 100644 index 8ee1e8b86c6f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IContainerAppsRevisionsOperations.cs +++ /dev/null @@ -1,177 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ContainerAppsRevisionsOperations operations. - /// - public partial interface IContainerAppsRevisionsOperations - { - /// - /// Get the Revisions for a given Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App for which Revisions are needed. - /// - /// - /// 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>> ListRevisionsWithHttpMessagesAsync(string resourceGroupName, string containerAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a revision of a Container App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision. - /// - /// - /// 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> GetRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Activates a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to activate - /// - /// - /// 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 ActivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deactivates a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to deactivate - /// - /// - /// 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 DeactivateRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restarts a revision for a Container App - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Container App. - /// - /// - /// Name of the Container App Revision to restart - /// - /// - /// 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 RestartRevisionWithHttpMessagesAsync(string resourceGroupName, string containerAppName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the Revisions for a given Container App. - /// - /// - /// 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>> ListRevisionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDeletedWebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDeletedWebAppsOperations.cs deleted file mode 100644 index 62f021f9a3a9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDeletedWebAppsOperations.cs +++ /dev/null @@ -1,150 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DeletedWebAppsOperations operations. - /// - public partial interface IDeletedWebAppsOperations - { - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a 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)); - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// - /// - /// 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 location, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get deleted app for a subscription at location. - /// - /// - /// Description for Get deleted app for a subscription at location. - /// - /// - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// 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> GetDeletedWebAppByLocationWithHttpMessagesAsync(string location, string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a 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)); - /// - /// Get all deleted apps for a subscription at location - /// - /// - /// Description for Get all deleted apps for a subscription at location - /// - /// - /// 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>> ListByLocationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs deleted file mode 100644 index f32bfe677fe3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDiagnosticsOperations.cs +++ /dev/null @@ -1,1036 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DiagnosticsOperations operations. - /// - public partial interface IDiagnosticsOperations - { - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListHostingEnvironmentDetectorResponsesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Hosting Environment Detector Response - /// - /// - /// Description for Get Hosting Environment Detector Response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// App Service Environment Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> GetHostingEnvironmentDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string name, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteDetectorResponsesWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> GetSiteDetectorResponseWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteDiagnosticCategoriesWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// 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> GetSiteDiagnosticCategoryWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// 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>> ListSiteAnalysesWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetSiteAnalysisWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> ExecuteSiteAnalysisWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// 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>> ListSiteDetectorsWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> ExecuteSiteDetectorWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteDetectorResponsesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get site detector response - /// - /// - /// Description for Get site detector response - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> GetSiteDetectorResponseSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteDiagnosticCategoriesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Category - /// - /// - /// Description for Get Diagnostics Category - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetSiteDiagnosticCategorySlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteAnalysesSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analysis - /// - /// - /// Description for Get Site Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Analysis Name - /// - /// - /// Slot - optional - /// - /// - /// 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> GetSiteAnalysisSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Execute Analysis - /// - /// - /// Description for Execute Analysis - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Category Name - /// - /// - /// Analysis Resource Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> ExecuteSiteAnalysisSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string analysisName, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteDetectorsSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detector - /// - /// - /// Description for Get Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Diagnostic Category - /// - /// - /// Detector Name - /// - /// - /// Slot Name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string diagnosticCategory, string detectorName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Execute Detector - /// - /// - /// Description for Execute Detector - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site Name - /// - /// - /// Detector Resource Name - /// - /// - /// Category Name - /// - /// - /// Slot Name - /// - /// - /// Start Time - /// - /// - /// End Time - /// - /// - /// Time Grain - /// - /// - /// 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> ExecuteSiteDetectorSlotWithHttpMessagesAsync(string resourceGroupName, string siteName, string detectorName, string diagnosticCategory, string slot, System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Hosting Environment Detector Responses - /// - /// - /// Description for List Hosting Environment Detector Responses - /// - /// - /// 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>> ListHostingEnvironmentDetectorResponsesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// 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>> ListSiteDetectorResponsesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// 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>> ListSiteDiagnosticCategoriesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// 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>> ListSiteAnalysesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// 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>> ListSiteDetectorsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List Site Detector Responses - /// - /// - /// Description for List Site Detector Responses - /// - /// - /// 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>> ListSiteDetectorResponsesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Diagnostics Categories - /// - /// - /// Description for Get Diagnostics Categories - /// - /// - /// 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>> ListSiteDiagnosticCategoriesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Site Analyses - /// - /// - /// Description for Get Site Analyses - /// - /// - /// 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>> ListSiteAnalysesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get Detectors - /// - /// - /// Description for Get Detectors - /// - /// - /// 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>> ListSiteDetectorsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainRegistrationProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainRegistrationProviderOperations.cs deleted file mode 100644 index f95f4e047bdf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainRegistrationProviderOperations.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DomainRegistrationProviderOperations operations. - /// - public partial interface IDomainRegistrationProviderOperations - { - /// - /// Implements Csm operations Api to exposes the list of available Csm - /// Apis under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list - /// of available Csm Apis under the resource 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>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Implements Csm operations Api to exposes the list of available Csm - /// Apis under the resource provider - /// - /// - /// Description for Implements Csm operations Api to exposes the list - /// of available Csm Apis under the resource 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>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs deleted file mode 100644 index 71ccd739de27..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IDomainsOperations.cs +++ /dev/null @@ -1,607 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// DomainsOperations operations. - /// - public partial interface IDomainsOperations - { - /// - /// Check if a domain is available for registration. - /// - /// - /// Description for Check if a domain is available for registration. - /// - /// - /// Name of the domain. - /// - /// - /// 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> CheckAvailabilityWithHttpMessagesAsync(NameIdentifier identifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a 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)); - /// - /// Generate a single sign-on request for the domain management portal. - /// - /// - /// Description for Generate a single sign-on request for the domain - /// management portal. - /// - /// - /// 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> GetControlCenterSsoRequestWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// Search parameters for domain name recommendations. - /// - /// - /// 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>> ListRecommendationsWithHttpMessagesAsync(DomainRecommendationSearchParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a domain. - /// - /// - /// Description for Get a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// 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 domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// 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 domainName, Domain domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a domain. - /// - /// - /// Description for Delete a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Specify <code>true</code> to delete the domain - /// immediately. The default is <code>false</code> which - /// deletes the domain after 24 hours. - /// - /// - /// 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 domainName, bool? forceHardDeleteDomain = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// 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 domainName, DomainPatchResource domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// 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>> ListOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get ownership identifier for domain - /// - /// - /// Description for Get ownership identifier for domain - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of 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> GetOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates an ownership identifier for a domain or updates identifier - /// details for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or - /// updates identifier details for an existing identifier - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// 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> CreateOrUpdateOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete ownership identifier for domain - /// - /// - /// Description for Delete ownership identifier for domain - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// 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 DeleteOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates an ownership identifier for a domain or updates identifier - /// details for an existing identifier - /// - /// - /// Description for Creates an ownership identifier for a domain or - /// updates identifier details for an existing identifier - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// Name of identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// 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> UpdateOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string domainName, string name, DomainOwnershipIdentifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Renew a domain. - /// - /// - /// Description for Renew a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// 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 RenewWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Transfer out domain to another registrar - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of domain. - /// - /// - /// 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> TransferOutWithHttpMessagesAsync(string resourceGroupName, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a domain. - /// - /// - /// Description for Creates or updates a domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the domain. - /// - /// - /// Domain registration information. - /// - /// - /// 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 domainName, Domain domain, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all domains in a subscription. - /// - /// - /// Description for Get all domains in a 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)); - /// - /// Get domain name recommendations based on keywords. - /// - /// - /// Description for Get domain name recommendations based on keywords. - /// - /// - /// 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>> ListRecommendationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all domains in a resource group. - /// - /// - /// Description for Get all domains in 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 domain ownership identifiers. - /// - /// - /// Description for Lists domain ownership identifiers. - /// - /// - /// 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>> ListOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs deleted file mode 100644 index c71309c9de0f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IGlobalModelOperations.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// GlobalModelOperations operations. - /// - public partial interface IGlobalModelOperations - { - /// - /// Get deleted app for a subscription. - /// - /// - /// Description for Get deleted app for a subscription. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// 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> GetDeletedWebAppWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all deleted apps for a subscription. - /// - /// - /// Description for Get all deleted apps for a subscription. - /// - /// - /// The numeric ID of the deleted app, e.g. 12345 - /// - /// - /// 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>> GetDeletedWebAppSnapshotsWithHttpMessagesAsync(string deletedSiteId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an operation in a subscription and given region - /// - /// - /// Description for Gets an operation in a subscription and given - /// region - /// - /// - /// Location name - /// - /// - /// Operation Id - /// - /// - /// 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 GetSubscriptionOperationWithAsyncResponseWithHttpMessagesAsync(string location, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs deleted file mode 100644 index c91aa361b24a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IKubeEnvironmentsOperations.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// KubeEnvironmentsOperations operations. - /// - public partial interface IKubeEnvironmentsOperations - { - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a subscription. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in a resource - /// group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the properties of a Kubernetes Environment. - /// - /// - /// Description for Get the properties of a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// 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 name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// 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 name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// 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 name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a 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)); - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in 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)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs deleted file mode 100644 index ed6bf7f9bd67..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IProviderOperations.cs +++ /dev/null @@ -1,398 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ProviderOperations operations. - /// - public partial interface IProviderOperations - { - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their - /// versions - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', '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>> GetAvailableStacksWithHttpMessagesAsync(string osTypeSelected = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their - /// versions - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetFunctionAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Function app frameworks and their versions for - /// location - /// - /// - /// Description for Get available Function app frameworks and their - /// versions for location - /// - /// - /// Function App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetFunctionAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions - /// for location - /// - /// - /// Web App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetWebAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all available operations for the Microsoft.Web resource - /// provider. Also exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// 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>> ListOperationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetWebAppStacksWithHttpMessagesAsync(string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their - /// versions - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', '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>> GetAvailableStacksOnPremWithHttpMessagesAsync(string osTypeSelected = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their - /// versions - /// - /// - /// 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>> GetAvailableStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their - /// versions - /// - /// - /// 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>> GetFunctionAppStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Function app frameworks and their versions for - /// location - /// - /// - /// Description for Get available Function app frameworks and their - /// versions for location - /// - /// - /// 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>> GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions - /// for location - /// - /// - /// 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>> GetWebAppStacksForLocationNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all available operations for the Microsoft.Web resource - /// provider. Also exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// 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>> ListOperationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// 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>> GetWebAppStacksNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their - /// versions - /// - /// - /// 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>> GetAvailableStacksOnPremNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IRecommendationsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IRecommendationsOperations.cs deleted file mode 100644 index 3ad582f3625d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IRecommendationsOperations.cs +++ /dev/null @@ -1,635 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// RecommendationsOperations operations. - /// - public partial interface IRecommendationsOperations - { - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a subscription. - /// - /// - /// Specify <code>true</code> to return only the most - /// critical recommendations. The default is - /// <code>false</code>, which returns all recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel - /// eq 'Api' or channel eq 'Notification' and startTime eq - /// 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[PT1H|PT1M|P1D] - /// - /// - /// 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(bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reset all recommendation opt-out settings for a subscription. - /// - /// - /// Description for Reset all recommendation opt-out settings for a - /// subscription. - /// - /// - /// 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 ResetAllFiltersWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disables the specified rule so it will not apply to a subscription - /// in the future. - /// - /// - /// Description for Disables the specified rule so it will not apply to - /// a subscription in the future. - /// - /// - /// Rule name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DisableRecommendationForSubscriptionWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get past recommendations for an app, optionally specified by the - /// time range. - /// - /// - /// Description for Get past recommendations for an app, optionally - /// specified by the time range. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Specify <code>false</code> to return all - /// recommendations. The default is <code>true</code>, - /// which returns only expired recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel - /// eq 'Api' or channel eq 'Notification' and startTime eq - /// 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[PT1H|PT1M|P1D] - /// - /// - /// 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>> ListHistoryForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, bool? expiredOnly = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most - /// critical recommendations. The default is - /// <code>false</code>, which returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified - /// by using OData syntax. Example: $filter=channel eq 'Api' or channel - /// eq 'Notification' - /// - /// - /// 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>> ListRecommendedRulesForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 DisableAllForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 ResetAllFiltersForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen - /// timestamp of the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. - /// You don't need to specify it to query an active entry. - /// - /// - /// 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> GetRuleDetailsByHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site - /// permanently. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DisableRecommendationForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string name, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get past recommendations for an app, optionally specified by the - /// time range. - /// - /// - /// Description for Get past recommendations for an app, optionally - /// specified by the time range. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>false</code> to return all - /// recommendations. The default is <code>true</code>, - /// which returns only expired recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel - /// eq 'Api' or channel eq 'Notification' and startTime eq - /// 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[PT1H|PT1M|P1D] - /// - /// - /// 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>> ListHistoryForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, bool? expiredOnly = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most - /// critical recommendations. The default is - /// <code>false</code>, which returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified - /// by using OData syntax. Example: $filter=channel eq 'Api' or channel - /// eq 'Notification' - /// - /// - /// 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>> ListRecommendedRulesForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DisableAllForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ResetAllFiltersForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen - /// timestamp of the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. - /// You don't need to specify it to query an active entry. - /// - /// - /// 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> GetRuleDetailsByWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site - /// permanently. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DisableRecommendationForSiteWithHttpMessagesAsync(string resourceGroupName, string siteName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a 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)); - /// - /// Get past recommendations for an app, optionally specified by the - /// time range. - /// - /// - /// Description for Get past recommendations for an app, optionally - /// specified by the time range. - /// - /// - /// 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>> ListHistoryForHostingEnvironmentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// 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>> ListRecommendedRulesForHostingEnvironmentNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get past recommendations for an app, optionally specified by the - /// time range. - /// - /// - /// Description for Get past recommendations for an app, optionally - /// specified by the time range. - /// - /// - /// 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>> ListHistoryForWebAppNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// 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>> ListRecommendedRulesForWebAppNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IResourceHealthMetadataOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IResourceHealthMetadataOperations.cs deleted file mode 100644 index 4e508bdff001..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IResourceHealthMetadataOperations.cs +++ /dev/null @@ -1,312 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// ResourceHealthMetadataOperations operations. - /// - public partial interface IResourceHealthMetadataOperations - { - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in - /// the 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)); - /// - /// List all ResourceHealthMetadata for all sites in the resource group - /// in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in - /// the resource group in the subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// 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)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site as a collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site as a collection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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>> ListBySiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// 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> GetBySiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site as a collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site as a collection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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>> ListBySiteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetBySiteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in - /// the 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)); - /// - /// List all ResourceHealthMetadata for all sites in the resource group - /// in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in - /// the resource group in the 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>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site as a collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site as a collection - /// - /// - /// 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>> ListBySiteNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the category of ResourceHealthMetadata to use for the given - /// site as a collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use - /// for the given site as a collection - /// - /// - /// 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>> ListBySiteSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs deleted file mode 100644 index 27111b69f27c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IStaticSitesOperations.cs +++ /dev/null @@ -1,2205 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// StaticSitesOperations operations. - /// - public partial interface IStaticSitesOperations - { - /// - /// Generates a preview workflow file for the static site - /// - /// - /// Description for Generates a preview workflow file for the static - /// site - /// - /// - /// Location where you plan to create the static site. - /// - /// - /// A JSON representation of the StaticSitesWorkflowPreviewRequest - /// properties. See example. - /// - /// - /// 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> PreviewWorkflowWithHttpMessagesAsync(string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a 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 all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource - /// group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// 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>> GetStaticSitesByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of a static site. - /// - /// - /// Description for Gets the details of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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> GetStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new static site in an existing resource group, or updates - /// an existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource - /// group, or updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// 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> CreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// 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 DeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new static site in an existing resource group, or updates - /// an existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource - /// group, or updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// 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> UpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for the users. - /// - /// - /// 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>> ListStaticSiteUsersWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the user entry from the static site. - /// - /// - /// Description for Deletes the user entry from the static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the staticsite. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// 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 DeleteStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a user entry with the listed roles - /// - /// - /// Description for Updates a user entry with the listed roles - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// A JSON representation of the StaticSiteUser properties. See - /// example. - /// - /// - /// 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> UpdateStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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>> GetStaticSiteBuildsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of a static site build. - /// - /// - /// Description for Gets the details of a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// 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 DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates the app settings of a static site build. - /// - /// - /// Description for Creates or updates the app settings of a static - /// site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site app settings to 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> CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates the function app settings of a static site - /// build. - /// - /// - /// Description for Creates or updates the function app settings of a - /// static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site function app settings to - /// 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> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site - /// build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site - /// build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site - /// build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function apps registered with - /// a static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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>> GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function app registered with - /// a static site build - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// 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> GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static - /// site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. - /// See example. - /// - /// - /// Specify <code>true</code> to force the update of the - /// auth configuration on the function app even if an - /// AzureStaticWebApps provider is already configured on the function - /// app. The default is <code>false</code>. - /// - /// - /// 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> RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Detach the user provided function app from the static site build - /// - /// - /// Description for Detach the user provided function app from the - /// static site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// 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 DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of - /// a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. - /// See example. - /// - /// - /// 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 CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates the app settings of a static site. - /// - /// - /// Description for Creates or updates the app settings of a static - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site app settings to 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> CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates or updates the function app settings of a static site. - /// - /// - /// Description for Creates or updates the function app settings of a - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site function app settings to - /// 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> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates an invitation link for a user with the role - /// - /// - /// Description for Creates an invitation link for a user with the role - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// 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> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a - /// particular static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// 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>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an existing custom domain for a particular static site. - /// - /// - /// Description for Gets an existing custom domain for a particular - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// The custom domain name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new static site custom domain in an existing resource - /// group and static site. - /// - /// - /// Description for Creates a new static site custom domain in an - /// existing resource group and static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request - /// properties. See example. - /// - /// - /// 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> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// 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 DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added - /// to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request - /// properties. See example. - /// - /// - /// 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 ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// 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 DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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>> ListStaticSiteFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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> ListStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists the roles configured for the static site. - /// - /// - /// Description for Lists the roles configured for the static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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> ListStaticSiteConfiguredRolesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists the secrets for an existing static site. - /// - /// - /// Description for Lists the secrets for an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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> ListStaticSiteSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// static site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// 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> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// 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> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resets the api key for an existing static site. - /// - /// - /// Description for Resets the api key for an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// 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 ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function apps registered with - /// a static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// 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>> GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function app registered with - /// a static site - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// 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> GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static - /// site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. - /// See example. - /// - /// - /// Specify <code>true</code> to force the update of the - /// auth configuration on the function app even if an - /// AzureStaticWebApps provider is already configured on the function - /// app. The default is <code>false</code>. - /// - /// - /// 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> RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Detach the user provided function app from the static site - /// - /// - /// Description for Detach the user provided function app from the - /// static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// 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 DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. - /// See example. - /// - /// - /// 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 CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new static site in an existing resource group, or updates - /// an existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource - /// group, or updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// 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> BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// 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 BeginDeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// 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 BeginDeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static - /// site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. - /// See example. - /// - /// - /// Specify <code>true</code> to force the update of the - /// auth configuration on the function app even if an - /// AzureStaticWebApps provider is already configured on the function - /// app. The default is <code>false</code>. - /// - /// - /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of - /// a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. - /// See example. - /// - /// - /// 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 BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new static site custom domain in an existing resource - /// group and static site. - /// - /// - /// Description for Creates a new static site custom domain in an - /// existing resource group and static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request - /// properties. See example. - /// - /// - /// 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> BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// 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 BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added - /// to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request - /// properties. See example. - /// - /// - /// 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 BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// 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 BeginDetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static - /// site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. - /// See example. - /// - /// - /// Specify <code>true</code> to force the update of the - /// auth configuration on the function app even if an - /// AzureStaticWebApps provider is already configured on the function - /// app. The default is <code>false</code>. - /// - /// - /// 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. - /// See example. - /// - /// - /// 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 BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a 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)); - /// - /// Gets all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource - /// group. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// 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>> ListStaticSiteUsersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static - /// site. - /// - /// - /// 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>> GetStaticSiteBuildsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site - /// build. - /// - /// - /// 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>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function apps registered with - /// a static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// 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>> GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a - /// particular static site. - /// - /// - /// 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>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// 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>> ListStaticSiteFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// static site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a static site - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of the user provided function apps registered with - /// a static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// 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>> GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ITopLevelDomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ITopLevelDomainsOperations.cs deleted file mode 100644 index 038b5626128e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ITopLevelDomainsOperations.cs +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// TopLevelDomainsOperations operations. - /// - public partial interface ITopLevelDomainsOperations - { - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for - /// registration. - /// - /// - /// 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)); - /// - /// Get details of a top-level domain. - /// - /// - /// Description for Get details of a top-level domain. - /// - /// - /// Name of the top-level domain. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept - /// before purchasing a domain. - /// - /// - /// Name of the top-level domain. - /// - /// - /// Domain agreement options. - /// - /// - /// 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>> ListAgreementsWithHttpMessagesAsync(string name, TopLevelDomainAgreementOption agreementOption, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for - /// registration. - /// - /// - /// 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)); - /// - /// Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept - /// before purchasing a domain. - /// - /// - /// 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>> ListAgreementsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs deleted file mode 100644 index 399c01db05f4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebAppsOperations.cs +++ /dev/null @@ -1,15921 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.IO; - using System.Threading; - using System.Threading.Tasks; - - /// - /// WebAppsOperations operations. - /// - public partial interface IWebAppsOperations - { - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a 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 all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Specify <strong>true</strong> to include deployment - /// slots in results. The default is false, which only gives you the - /// production slot of all apps. - /// - /// - /// 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, bool? includeSlots = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// 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 name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the - /// deployment slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By - /// default, empty App Service plan is deleted. - /// - /// - /// 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 name, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// 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 name, SitePatchResource siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Custom hostname. - /// - /// - /// 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> AnalyzeCustomHostnameWithHttpMessagesAsync(string resourceGroupName, string name, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Applies the configuration settings from the target slot onto the - /// current slot. - /// - /// - /// Description for Applies the configuration settings from the target - /// slot onto the current slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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 ApplySlotConfigToProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST - /// action as input here. - /// - /// - /// 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 name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// 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> GetBackupStatusWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// 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 DeleteBackupWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets status of a web app backup that may be in progress, including - /// secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new - /// URL is passed in the request body. - /// - /// - /// Description for Gets status of a web app backup that may be in - /// progress, including secrets associated with the backup, such as the - /// Azure Storage SAS URL. Also can be used to update the SAS URL for - /// the backup if a new URL is passed in the request body. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// 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> ListBackupStatusSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// 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 RestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is - /// allowed for a given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and - /// whether Ftp is allowed for a given site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetFtpAllowedWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> UpdateFtpAllowedWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the - /// site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetScmAllowedWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates whether user publishing credentials are allowed on the site - /// or not. - /// - /// - /// Description for Updates whether user publishing credentials are - /// allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> UpdateScmAllowedWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListConfigurationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// 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> UpdateApplicationSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListApplicationSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Authentication / Authorization settings associated with - /// web app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// 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> UpdateAuthSettingsWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of - /// an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetAuthSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Description for Gets site's Authentication / Authorization settings - /// for apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Description for Updates site's Authentication / Authorization - /// settings for apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// 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> UpdateAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Description for Gets site's Authentication / Authorization settings - /// for apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of - /// an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// 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> UpdateAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// 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> UpdateBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DeleteBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// 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> UpdateConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging - /// configuration to change in the "properties" 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> UpdateDiagnosticLogsConfigWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// 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> UpdateMetadataWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListMetadataWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// 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> UpdateSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> ListSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the names of app settings and connection strings that stick to - /// the slot (not swapped). - /// - /// - /// Description for Gets the names of app settings and connection - /// strings that stick to the slot (not swapped). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the names of application settings and connection string - /// that remain with the slot during swap operation. - /// - /// - /// Description for Updates the names of application settings and - /// connection string that remain with the slot during swap operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Names of application settings and connection strings. See example. - /// - /// - /// 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> UpdateSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the configuration of an app, such as platform version and - /// bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform - /// version and bitness, default documents, virtual applications, - /// Always On, etc. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// 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> CreateOrUpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// 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> UpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of web app configuration snapshots identifiers. Each - /// element of the list contains a timestamp and the ID of the - /// snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots - /// identifiers. Each element of the list contains a timestamp and the - /// ID of the snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListConfigurationSnapshotInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a snapshot of the configuration of an app at a previous point - /// in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// 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> GetConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous - /// snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// 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 RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given - /// site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetWebSiteContainerLogsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the - /// given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetContainerLogsZipWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListContinuousWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a continuous web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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> GetContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a continuous web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 DeleteContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 StartContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 StopContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListDeploymentsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// 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> GetDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Deployment details. - /// - /// - /// 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> CreateDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// 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 DeleteDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployment log for specific deployment for an app, or a - /// deployment slot. - /// - /// - /// Description for List deployment log for specific deployment for an - /// app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name - /// property in the JSON response from "GET - /// /api/sites/{siteName}/deployments". - /// - /// - /// 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> ListDeploymentLogWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Discovers an existing app backup that can be restored from a blob - /// in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// Description for Discovers an existing app backup that can be - /// restored from a blob in Azure storage. Use this to get information - /// about the databases stored in a backup. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog - /// name for discovery of backup. - /// - /// - /// 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> DiscoverBackupWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated - /// with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership 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> GetDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a domain ownership identifier for web app, or updates an - /// existing ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, - /// or updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// 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> CreateOrUpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// 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 DeleteDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a domain ownership identifier for web app, or updates an - /// existing ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, - /// or updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// 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> UpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetMSDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy 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> CreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy - /// operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke onedeploy status API /api/deployments and gets the - /// deployment status for the site - /// - /// - /// Description for Invoke onedeploy status API /api/deployments and - /// gets the deployment status for the site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetOneDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the OneDeploy publish web app extension. - /// - /// - /// Description for Invoke the OneDeploy publish web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> CreateOneDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for - /// a master key. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetFunctionsAdminTokenWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function information by its ID for web site, or a deployment - /// slot. - /// - /// - /// Description for Get function information by its ID for web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// 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> CreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or 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> CreateOrUpdateFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// 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 DeleteFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function keys for a function in a web site, or a deployment - /// slot. - /// - /// - /// Description for Get function keys for a function in a web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListFunctionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function secrets for a function in a web site, or a deployment - /// slot. - /// - /// - /// Description for Get function secrets for a function in a web site, - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListFunctionSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListHostKeysWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM - /// template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ListSyncStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management - /// database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 SyncFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or 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> CreateOrUpdateHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// 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 DeleteHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListHostNameBindingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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> GetHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a - /// HostNameBinding object. - /// - /// - /// 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> CreateOrUpdateHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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 DeleteHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web - /// App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection - /// used by this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// 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> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus - /// relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// 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> CreateOrUpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// 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 DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus - /// relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// 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> UpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used - /// by this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets hybrid connections configured for an app (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListRelayServiceConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// 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> GetRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new hybrid connection configuration (PUT), or updates an - /// existing one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration - /// (PUT), or updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// 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> CreateOrUpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// 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 DeleteRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new hybrid connection configuration (PUT), or updates an - /// existing one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration - /// (PUT), or updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// 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> UpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListInstanceIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> GetInstanceInfoWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app 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> GetInstanceMsDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> CreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy - /// operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app 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> GetInstanceMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessesWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Terminate a process by its ID for a web site, or a deployment slot, - /// or specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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 DeleteInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a memory dump of a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another - /// resource group or subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> IsCloneableWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListSiteBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM - /// template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListSyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// 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> MigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a - /// remote MySql database. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// 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> MigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the status of MySql in app migration, if one is active, and - /// whether or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if - /// one is active, and whether or not MySql in app is enabled - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetMigrateMySqlStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// 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> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an - /// app (or deployment slot). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// 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> UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// 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> ListNetworkFeaturesWithHttpMessagesAsync(string resourceGroupName, string name, string view, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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> StartWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> StartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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 StopWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTracesWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTraceOperationV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTracesV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Generates a new publishing password for an app (or deployment slot, - /// if specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 GenerateNewSitePublishingPasswordWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms - /// to odata syntax. Example: $filter=(startTime eq - /// 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// 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>> ListPerfMonCountersWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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> GetSitePhpErrorLogFlagWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> ListPremierAddOnsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// 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> AddPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeletePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// 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> UpdatePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets data around private site access enablement and authorized - /// Virtual Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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> GetPrivateAccessWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Sets data around private site access enablement and authorized - /// Virtual Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// 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> PutPrivateAccessVnetWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// 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> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// 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> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Terminate a process by its ID for a web site, or a deployment slot, - /// or specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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 DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a memory dump of a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// 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> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetPublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// 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> CreateOrUpdatePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeletePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the publishing profile for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the publishing profile for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For - /// example, use {"format": "FileZilla3"} to get a FileZilla publishing - /// profile. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> ListPublishingProfileXmlWithSecretsWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current - /// slot if they were previously modified by calling the API with POST. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ResetProductionSlotConfigWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify true to apply the configuration settings and restarts the - /// app only if necessary. By default, the API always restarts and - /// reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is - /// set to false, and the API responds immediately (asynchronous). - /// - /// - /// 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 RestartWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure - /// Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// 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 RestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// 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 RestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by - /// calling GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// 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 RestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSiteExtensionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get site extension information by its ID for a web site, or a - /// deployment slot. - /// - /// - /// Description for Get site extension information by its ID for a web - /// site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> InstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListSlotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns the - /// production slot. - /// - /// - /// 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> GetSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this - /// API attempts to create or modify the production slot. - /// - /// - /// 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> CreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the - /// deployment slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// Name of the deployment slot to delete. By default, the API deletes - /// the production slot. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By - /// default, empty App Service plan is deleted. - /// - /// - /// 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 DeleteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this - /// API attempts to create or modify the production slot. - /// - /// - /// 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> UpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// Custom hostname. - /// - /// - /// 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> AnalyzeCustomHostnameSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Applies the configuration settings from the target slot onto the - /// current slot. - /// - /// - /// Description for Applies the configuration settings from the target - /// slot onto the current slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. - /// - /// - /// 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 ApplySlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST - /// action as input here. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will create a backup for the production slot. - /// - /// - /// 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> BackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get backups of the production slot. - /// - /// - /// 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>> ListBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get a backup of the production slot. - /// - /// - /// 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> GetBackupStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete a backup of the production slot. - /// - /// - /// 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 DeleteBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets status of a web app backup that may be in progress, including - /// secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new - /// URL is passed in the request body. - /// - /// - /// Description for Gets status of a web app backup that may be in - /// progress, including secrets associated with the backup, such as the - /// Azure Storage SAS URL. Also can be used to update the SAS URL for - /// the backup if a new URL is passed in the request body. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> ListBackupStatusSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will restore a backup of the production slot. - /// - /// - /// 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 RestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is - /// allowed for a given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and - /// whether Ftp is allowed for a given site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> GetFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// 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> UpdateFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the - /// site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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> GetScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates whether user publishing credentials are allowed on the site - /// or not. - /// - /// - /// Description for Updates whether user publishing credentials are - /// allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// 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> UpdateScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will return configuration for the production slot. - /// - /// - /// 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>> ListConfigurationsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the application settings for the production slot. - /// - /// - /// 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> UpdateApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the application settings for the production slot. - /// - /// - /// 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> ListApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Authentication / Authorization settings associated with - /// web app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of - /// an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the settings for the production slot. - /// - /// - /// 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> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the settings for the production slot. - /// - /// - /// 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> GetAuthSettingsV2WithoutSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Description for Updates site's Authentication / Authorization - /// settings for apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets site's Authentication / Authorization settings for apps via - /// the V2 format - /// - /// - /// Description for Gets site's Authentication / Authorization settings - /// for apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the settings for the production slot. - /// - /// - /// 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> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of - /// an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the Azure storage account configurations for the - /// production slot. - /// - /// - /// 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> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the Azure storage account configurations for the - /// production slot. - /// - /// - /// 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> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the backup configuration for the production slot. - /// - /// - /// 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> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the backup configuration for the production slot. - /// - /// - /// 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 DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the backup configuration for the production slot. - /// - /// - /// 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> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// 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> GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the connection settings for the production slot. - /// - /// - /// 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> UpdateConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the connection settings for the production slot. - /// - /// - /// 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> ListConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the logging configuration for the production slot. - /// - /// - /// 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> GetDiagnosticLogsConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging - /// configuration to change in the "properties" property. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the logging configuration for the production slot. - /// - /// - /// 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> UpdateDiagnosticLogsConfigSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the metadata for the production slot. - /// - /// - /// 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> UpdateMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the metadata for the production slot. - /// - /// - /// 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> ListMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the publishing credentials for the production slot. - /// - /// - /// 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> ListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> UpdateSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> ListSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the configuration of an app, such as platform version and - /// bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform - /// version and bitness, default documents, virtual applications, - /// Always On, etc. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will return configuration for the production slot. - /// - /// - /// 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> GetConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update configuration for the production slot. - /// - /// - /// 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> CreateOrUpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update configuration for the production slot. - /// - /// - /// 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> UpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of web app configuration snapshots identifiers. Each - /// element of the list contains a timestamp and the ID of the - /// snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots - /// identifiers. Each element of the list contains a timestamp and the - /// ID of the snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will return configuration for the production slot. - /// - /// - /// 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>> ListConfigurationSnapshotInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a snapshot of the configuration of an app at a previous point - /// in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will return configuration for the production slot. - /// - /// - /// 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> GetConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous - /// snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will return configuration for the production slot. - /// - /// - /// 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 RecoverSiteConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given - /// site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetWebSiteContainerLogsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the - /// given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetContainerLogsZipSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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>> ListContinuousWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a continuous web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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> GetContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a continuous web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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 DeleteContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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 StartContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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 StopContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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>> ListDeploymentsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// gets a deployment for the production slot. - /// - /// - /// 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> GetDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// creates a deployment for the production slot. - /// - /// - /// Deployment details. - /// - /// - /// 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> CreateDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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 DeleteDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployment log for specific deployment for an app, or a - /// deployment slot. - /// - /// - /// Description for List deployment log for specific deployment for an - /// app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name - /// property in the JSON response from "GET - /// /api/sites/{siteName}/deployments". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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> ListDeploymentLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Discovers an existing app backup that can be restored from a blob - /// in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// Description for Discovers an existing app backup that can be - /// restored from a blob in Azure storage. Use this to get information - /// about the databases stored in a backup. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog - /// name for discovery of backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will perform discovery for the production slot. - /// - /// - /// 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> DiscoverBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated - /// with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// 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> GetDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a domain ownership identifier for web app, or updates an - /// existing ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, - /// or updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// 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> CreateOrUpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// 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 DeleteDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a domain ownership identifier for web app, or updates an - /// existing ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, - /// or updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// 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> UpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetMSDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// Details of MSDeploy 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> CreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy - /// operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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>> ListInstanceFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for - /// a master key. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetFunctionsAdminTokenSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function information by its ID for web site, or a deployment - /// slot. - /// - /// - /// Description for Get function information by its ID for web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> GetInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// 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> CreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or 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> CreateOrUpdateFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function keys for a function in a web site, or a deployment - /// slot. - /// - /// - /// Description for Get function keys for a function in a web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> ListFunctionKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get function secrets for a function in a web site, or a deployment - /// slot. - /// - /// - /// Description for Get function secrets for a function in a web site, - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> ListFunctionSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> ListHostKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM - /// template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 ListSyncStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management - /// database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 SyncFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or 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> CreateOrUpdateHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// gets hostname bindings for the production slot. - /// - /// - /// 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>> ListHostNameBindingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// the named binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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> GetHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a - /// HostNameBinding object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will create a binding for the production slot. - /// - /// - /// 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> CreateOrUpdateHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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 DeleteHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web - /// App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection - /// used by this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> GetHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus - /// relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> CreateOrUpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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 DeleteHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus - /// relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> UpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used - /// by this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> ListHybridConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets hybrid connections configured for an app (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get hybrid connections for the production slot. - /// - /// - /// 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> ListRelayServiceConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get a hybrid connection for the production slot. - /// - /// - /// 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> GetRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new hybrid connection configuration (PUT), or updates an - /// existing one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration - /// (PUT), or updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will create or update a hybrid connection for the production slot. - /// - /// - /// 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> CreateOrUpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete a hybrid connection for the production slot. - /// - /// - /// 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 DeleteRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new hybrid connection configuration (PUT), or updates an - /// existing one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration - /// (PUT), or updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will create or update a hybrid connection for the production slot. - /// - /// - /// 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> UpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// gets the production slot instances. - /// - /// - /// 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>> ListInstanceIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// gets the production slot instances. - /// - /// - /// 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> GetInstanceInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// ID of web app 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> GetInstanceMsDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> CreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy - /// operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// ID of web app 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> GetInstanceMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Terminate a process by its ID for a web site, or a deployment slot, - /// or specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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 DeleteInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a memory dump of a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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> GetInstanceProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET - /// api/sites/{siteName}/instances". - /// - /// - /// 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>> ListInstanceProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another - /// resource group or subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns - /// information on the production slot. - /// - /// - /// 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> IsCloneableSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get backups of the production slot. - /// - /// - /// 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>> ListSiteBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM - /// template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> ListSyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the status of MySql in app migration, if one is active, and - /// whether or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if - /// one is active, and whether or not MySql in app is enabled - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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> GetMigrateMySqlStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get a gateway for the production slot's Virtual Network. - /// - /// - /// 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> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// 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> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an - /// app (or deployment slot). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the connection for the production slot. - /// - /// - /// 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 DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Integrates this Web App with a Virtual Network. This requires that - /// 1) "swiftSupported" is true when doing a GET against this resource, - /// and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. - /// This requires that 1) "swiftSupported" is true when doing a GET - /// against this resource, and 2) that the target Subnet has already - /// been delegated, and is not - /// in use by another App Service Plan other than the one this App is - /// in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// 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> UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get network features for the production slot. - /// - /// - /// 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> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get an operation for the production slot. - /// - /// - /// 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>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// 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 StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get an operation for the production slot. - /// - /// - /// 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>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get an operation for the production slot. - /// - /// - /// 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>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named operation for a network trace capturing (or deployment - /// slot, if specified). - /// - /// - /// Description for Gets a named operation for a network trace - /// capturing (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get an operation for the production slot. - /// - /// - /// 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>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Generates a new publishing password for an app (or deployment slot, - /// if specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// generate a new publishing password for the production slot. - /// - /// - /// 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 GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms - /// to odata syntax. Example: $filter=(startTime eq - /// 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// 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>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the premier add-ons for the production slot. - /// - /// - /// 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> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the named add-on for the production slot. - /// - /// - /// 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> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the named add-on for the production slot. - /// - /// - /// 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> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the named add-on for the production slot. - /// - /// - /// 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 DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the named add-on for the production slot. - /// - /// - /// 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> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets data around private site access enablement and authorized - /// Virtual Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Sets data around private site access enablement and authorized - /// Virtual Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// 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>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// 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> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// 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> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// 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> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// 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> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Terminate a process by its ID for a web site, or a deployment slot, - /// or specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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 DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get a memory dump of a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for Get process information by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// gets hostname bindings for the production slot. - /// - /// - /// 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>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// the named binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will create a binding for the production slot. - /// - /// - /// 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> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the publishing profile for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the publishing profile for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For - /// example, use {"format": "FileZilla3"} to get a FileZilla publishing - /// profile. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the publishing profile for the production slot. - /// - /// - /// 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> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current - /// slot if they were previously modified by calling the API with POST. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// resets configuration settings for the production slot. - /// - /// - /// 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 ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will restart the production slot. - /// - /// - /// Specify true to apply the configuration settings and restarts the - /// app only if necessary. By default, the API always restarts and - /// reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is - /// set to false, and the API responds immediately (asynchronous). - /// - /// - /// 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 RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure - /// Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will restore a backup of the production slot. - /// - /// - /// 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 RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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 RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by - /// calling GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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 RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get site extension information by its ID for a web site, or a - /// deployment slot. - /// - /// - /// Description for Get site extension information by its ID for a web - /// site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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 DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the difference in configuration settings between two web app - /// slots. - /// - /// - /// Description for Get the difference in configuration settings - /// between two web app slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. - /// - /// - /// 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>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. - /// - /// - /// 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 SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// 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>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// 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>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the source control configuration for the production slot. - /// - /// - /// 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> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the source control configuration for the production - /// slot. - /// - /// - /// 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> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the source control configuration for the production - /// slot. - /// - /// - /// - /// - /// 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 DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the source control configuration for the production - /// slot. - /// - /// - /// 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> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will start the production slot. - /// - /// - /// 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 StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will stop the production slot. - /// - /// - /// 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 StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// 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 StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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 SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management - /// database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes a deployment for the production slot. - /// - /// - /// 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>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a triggered web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a triggered web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// deletes web job for the production slot. - /// - /// - /// 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 DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List a triggered web job's history for an app, or a deployment - /// slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a triggered web job's history by its ID for an app, , or a - /// deployment slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an - /// app, , or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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 RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get quota information of the production slot. - /// - /// - /// Return only information specified in the filter (using OData - /// syntax). For example: $filter=(name.value eq 'Metric1' or - /// name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// 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>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the virtual networks the app (or deployment slot) is connected - /// to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment - /// slot) is connected to. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get virtual network connections for the production slot. - /// - /// - /// 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>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a virtual network the app (or deployment slot) is connected to - /// by name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) - /// is connected to by name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the named virtual network for the production slot. - /// - /// - /// 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> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or - /// updates the connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot - /// (PUT) or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// 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> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a connection from an app (or deployment slot to a named - /// virtual network. - /// - /// - /// Description for Deletes a connection from an app (or deployment - /// slot to a named virtual network. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will delete the connection for the production slot. - /// - /// - /// 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 DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or - /// updates the connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot - /// (PUT) or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update connections for the production slot. - /// - /// - /// 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> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get a gateway for the production slot's Virtual Network. - /// - /// - /// 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> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it - /// (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) - /// or updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update a gateway for the production slot's Virtual - /// Network. - /// - /// - /// 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> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it - /// (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) - /// or updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will add or update a gateway for the production slot's Virtual - /// Network. - /// - /// - /// 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> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// returns deployments for the production slot. - /// - /// - /// 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> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the difference in configuration settings between two web app - /// slots. - /// - /// - /// Description for Get the difference in configuration settings - /// between two web app slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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 SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// 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> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// 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> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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 StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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 SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management - /// database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a triggered web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete a triggered web job by its ID for an app, or a deployment - /// slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List a triggered web job's history for an app, or a deployment - /// slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a triggered web job's history by its ID for an app, , or a - /// deployment slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an - /// app, , or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// 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> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Return only information specified in the filter (using OData - /// syntax). For example: $filter=(name.value eq 'Metric1' or - /// name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the virtual networks the app (or deployment slot) is connected - /// to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment - /// slot) is connected to. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a virtual network the app (or deployment slot) is connected to - /// by name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) - /// is connected to by name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// 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> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or - /// updates the connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot - /// (PUT) or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// 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> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a connection from an app (or deployment slot to a named - /// virtual network. - /// - /// - /// Description for Deletes a connection from an app (or deployment - /// slot to a named virtual network. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// 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 DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or - /// updates the connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot - /// (PUT) or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// 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> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// 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> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it - /// (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) - /// or updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// 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> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it - /// (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) - /// or updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is - /// "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// 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> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// 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> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// 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 name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// 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 BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy 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> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// 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> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// 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> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a - /// remote MySql database. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// 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> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure - /// Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// 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 BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// 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 BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by - /// calling GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// 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 BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates a new web, mobile, or API app in an existing resource - /// group, or updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an - /// existing resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this - /// API attempts to create or modify the production slot. - /// - /// - /// 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> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will restore a backup of the production slot. - /// - /// - /// 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 BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will get the publishing credentials for the production slot. - /// - /// - /// 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> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// Details of MSDeploy 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> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// 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> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// 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> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// 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> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure - /// Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will restore a backup of the production slot. - /// - /// - /// 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 BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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 BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by - /// calling GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to - /// production slot. - /// - /// - /// 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 BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// uses the production slot. - /// - /// - /// 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> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production - /// slot is used as the source slot. - /// - /// - /// 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 BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API - /// will update the source control configuration for the production - /// slot. - /// - /// - /// 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> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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 BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// 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> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// 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>> BeginStartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a 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)); - /// - /// Gets all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is - /// allowed for a given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and - /// whether Ftp is allowed for a given site. - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// 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>> ListConfigurationsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of web app configuration snapshots identifiers. Each - /// element of the list contains a timestamp and the ID of the - /// snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots - /// identifiers. Each element of the list contains a timestamp and the - /// ID of the snapshot. - /// - /// - /// 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>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListContinuousWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// 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>> ListDeploymentsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated - /// with web app. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment - /// slot. - /// - /// - /// 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>> ListFunctionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment - /// slot. - /// - /// - /// 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>> ListHostNameBindingsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// 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>> ListInstanceIdentifiersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// 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>> ListInstanceProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListSiteBackupsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// 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>> ListPerfMonCountersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a site - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// 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>> ListProcessesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessModulesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessThreadsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment - /// slot. - /// - /// - /// 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>> ListPublicCertificatesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a - /// deployment slot. - /// - /// - /// 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>> ListSiteExtensionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// 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>> ListSlotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is - /// allowed for a given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and - /// whether Ftp is allowed for a given site. - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// 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>> ListConfigurationsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status - /// of an app - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets a list of web app configuration snapshots identifiers. Each - /// element of the list contains a timestamp and the ID of the - /// snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots - /// identifiers. Each element of the list contains a timestamp and the - /// ID of the snapshot. - /// - /// - /// 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>> ListConfigurationSnapshotInfoSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListContinuousWebJobsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// 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>> ListDeploymentsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated - /// with web app. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment - /// slot. - /// - /// - /// 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>> ListInstanceFunctionsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment - /// slot. - /// - /// - /// 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>> ListHostNameBindingsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// 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>> ListInstanceIdentifiersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// 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>> ListInstanceProcessesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessModulesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessThreadsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListSiteBackupsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// 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>> ListPerfMonCountersSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the list of private endpoint connections associated with a - /// site - /// - /// - /// Description for Gets the list of private endpoint connections - /// associated with a site - /// - /// - /// 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>> GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of processes for a web site, or a deployment slot, or for - /// a specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a - /// deployment slot, or for a specific scaled-out instance in a web - /// site. - /// - /// - /// 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>> ListProcessesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List module information for a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for - /// a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessModulesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List the threads in a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessThreadsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment - /// slot. - /// - /// - /// 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>> ListPublicCertificatesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a - /// deployment slot. - /// - /// - /// 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>> ListSiteExtensionsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the difference in configuration settings between two web app - /// slots. - /// - /// - /// Description for Get the difference in configuration settings - /// between two web app slots. - /// - /// - /// 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>> ListSlotDifferencesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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>> ListSnapshotsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// 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>> ListSnapshotsFromDRSecondarySlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment - /// slot. - /// - /// - /// 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>> ListTriggeredWebJobsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List a triggered web job's history for an app, or a deployment - /// slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobHistorySlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or - /// deployment slot, if specified). - /// - /// - /// 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>> ListUsagesSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// 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>> ListWebJobsSlotNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get the difference in configuration settings between two web app - /// slots. - /// - /// - /// Description for Get the difference in configuration settings - /// between two web app slots. - /// - /// - /// 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>> ListSlotDifferencesFromProductionNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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>> ListSnapshotsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// 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>> ListSnapshotsFromDRSecondaryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment - /// slot. - /// - /// - /// 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>> ListTriggeredWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List a triggered web job's history for an app, or a deployment - /// slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobHistoryNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or - /// deployment slot, if specified). - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// 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>> ListWebJobsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs deleted file mode 100644 index 4adbb7e0a293..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/IWebSiteManagementClient.cs +++ /dev/null @@ -1,589 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// WebSite Management Client - /// - public partial interface IWebSiteManagementClient : 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; } - - /// - /// Your Azure subscription ID. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). - /// - string SubscriptionId { get; set; } - - /// - /// API Version - /// - string ApiVersion { get; } - - /// - /// The preferred language for the response. - /// - string AcceptLanguage { get; set; } - - /// - /// The retry timeout in seconds for Long Running Operations. Default - /// value is 30. - /// - int? LongRunningOperationRetryTimeout { get; set; } - - /// - /// Whether a unique x-ms-client-request-id should be generated. When - /// set to true a unique x-ms-client-request-id value is generated and - /// included in each request. Default is true. - /// - bool? GenerateClientRequestId { get; set; } - - - /// - /// Gets the IAppServiceCertificateOrdersOperations. - /// - IAppServiceCertificateOrdersOperations AppServiceCertificateOrders { get; } - - /// - /// Gets the ICertificateOrdersDiagnosticsOperations. - /// - ICertificateOrdersDiagnosticsOperations CertificateOrdersDiagnostics { get; } - - /// - /// Gets the ICertificateRegistrationProviderOperations. - /// - ICertificateRegistrationProviderOperations CertificateRegistrationProvider { get; } - - /// - /// Gets the IDomainsOperations. - /// - IDomainsOperations Domains { get; } - - /// - /// Gets the ITopLevelDomainsOperations. - /// - ITopLevelDomainsOperations TopLevelDomains { get; } - - /// - /// Gets the IDomainRegistrationProviderOperations. - /// - IDomainRegistrationProviderOperations DomainRegistrationProvider { get; } - - /// - /// Gets the IAppServiceEnvironmentsOperations. - /// - IAppServiceEnvironmentsOperations AppServiceEnvironments { get; } - - /// - /// Gets the IAppServicePlansOperations. - /// - IAppServicePlansOperations AppServicePlans { get; } - - /// - /// Gets the ICertificatesOperations. - /// - ICertificatesOperations Certificates { get; } - - /// - /// Gets the IContainerAppsOperations. - /// - IContainerAppsOperations ContainerApps { get; } - - /// - /// Gets the IContainerAppsRevisionsOperations. - /// - IContainerAppsRevisionsOperations ContainerAppsRevisions { get; } - - /// - /// Gets the IDeletedWebAppsOperations. - /// - IDeletedWebAppsOperations DeletedWebApps { get; } - - /// - /// Gets the IDiagnosticsOperations. - /// - IDiagnosticsOperations Diagnostics { get; } - - /// - /// Gets the IGlobalModelOperations. - /// - IGlobalModelOperations GlobalModel { get; } - - /// - /// Gets the IKubeEnvironmentsOperations. - /// - IKubeEnvironmentsOperations KubeEnvironments { get; } - - /// - /// Gets the IProviderOperations. - /// - IProviderOperations Provider { get; } - - /// - /// Gets the IRecommendationsOperations. - /// - IRecommendationsOperations Recommendations { get; } - - /// - /// Gets the IResourceHealthMetadataOperations. - /// - IResourceHealthMetadataOperations ResourceHealthMetadata { get; } - - /// - /// Gets the IStaticSitesOperations. - /// - IStaticSitesOperations StaticSites { get; } - - /// - /// Gets the IWebAppsOperations. - /// - IWebAppsOperations WebApps { get; } - - /// - /// Gets publishing user - /// - /// - /// Description for Gets publishing user - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> GetPublishingUserWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates publishing user - /// - /// - /// Description for Updates publishing user - /// - /// - /// Details of publishing user - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> UpdatePublishingUserWithHttpMessagesAsync(User userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure - /// websites. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListSourceControlsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets source control token - /// - /// - /// Description for Gets source control token - /// - /// - /// Type of source control - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> GetSourceControlWithHttpMessagesAsync(string sourceControlType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates source control token - /// - /// - /// Description for Updates source control token - /// - /// - /// Type of source control - /// - /// - /// Source control token information - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> UpdateSourceControlWithHttpMessagesAsync(string sourceControlType, SourceControl requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// Azure Location of billable resource - /// - /// - /// App Service OS type meters used for - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListBillingMetersWithHttpMessagesAsync(string billingLocation = default(string), string osType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Check if a resource name is available. - /// - /// - /// Description for Check if a resource name is available. - /// - /// - /// Resource name to verify. - /// - /// - /// Resource type used for verification. Possible values include: - /// 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', - /// 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', - /// 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - /// - /// Is fully qualified domain name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, string type, bool? isFqdn = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get custom hostnames under this subscription - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListCustomHostNameSitesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets list of available geo regions plus ministamps - /// - /// - /// Description for Gets list of available geo regions plus ministamps - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> GetSubscriptionDeploymentLocationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// Name of SKU used to filter the regions. Possible values include: - /// 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', - /// 'Isolated', 'IsolatedV2', 'PremiumV2', 'PremiumV3', - /// 'PremiumContainer', 'ElasticPremium', 'ElasticIsolated' - /// - /// - /// Specify <code>true</code> if you want to filter to only - /// regions that support Linux workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only - /// regions that support Xenon workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only - /// regions that support Linux Consumption Workers. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListGeoRegionsWithHttpMessagesAsync(string sku = default(string), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// Hostname information. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListSiteIdentifiersAssignedToHostNameWithHttpMessagesAsync(NameIdentifier nameIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListPremierAddOnOffersWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List all SKUs. - /// - /// - /// Description for List all SKUs. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> ListSkusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Verifies if this VNET is compatible with an App Service Environment - /// by analyzing the Network Security Group rules. - /// - /// - /// Description for Verifies if this VNET is compatible with an App - /// Service Environment by analyzing the Network Security Group rules. - /// - /// - /// VNET information - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> VerifyHostingEnvironmentVnetWithHttpMessagesAsync(VnetParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Move resources between resource groups. - /// - /// - /// Description for Move resources between resource groups. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task MoveWithHttpMessagesAsync(string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Validate if a resource can be created. - /// - /// - /// Description for Validate if a resource can be created. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Request with the resources to validate. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task> ValidateWithHttpMessagesAsync(string resourceGroupName, ValidateRequest validateRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Validate whether a resource can be moved. - /// - /// - /// Description for Validate whether a resource can be moved. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task ValidateMoveWithHttpMessagesAsync(string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure - /// websites. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListSourceControlsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListBillingMetersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get custom hostnames under this subscription - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListCustomHostNameSitesNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListGeoRegionsNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListSiteIdentifiersAssignedToHostNameNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - Task>> ListPremierAddOnOffersNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs deleted file mode 100644 index 6f817f1b68ec..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperations.cs +++ /dev/null @@ -1,1708 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// KubeEnvironmentsOperations operations. - /// - internal partial class KubeEnvironmentsOperations : IServiceOperations, IKubeEnvironmentsOperations - { - /// - /// Initializes a new instance of the KubeEnvironmentsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal KubeEnvironmentsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a subscription. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListBySubscriptionWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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, "ListBySubscription", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/kubeEnvironments").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in a resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/kubeEnvironments").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the properties of a Kubernetes Environment. - /// - /// - /// Description for Get the properties of a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/kubeEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (kubeEnvironmentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); - 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.Web/kubeEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(kubeEnvironmentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, KubeEnvironment kubeEnvironmentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (kubeEnvironmentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "kubeEnvironmentEnvelope"); - } - if (kubeEnvironmentEnvelope != null) - { - kubeEnvironmentEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("kubeEnvironmentEnvelope", kubeEnvironmentEnvelope); - 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.Web/kubeEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(kubeEnvironmentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(kubeEnvironmentEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/kubeEnvironments/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs deleted file mode 100644 index fda574b00e42..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/KubeEnvironmentsOperationsExtensions.cs +++ /dev/null @@ -1,467 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for KubeEnvironmentsOperations. - /// - public static partial class KubeEnvironmentsOperationsExtensions - { - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListBySubscription(this IKubeEnvironmentsOperations operations) - { - return operations.ListBySubscriptionAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySubscriptionAsync(this IKubeEnvironmentsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IKubeEnvironmentsOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in a resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the properties of a Kubernetes Environment. - /// - /// - /// Description for Get the properties of a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - public static KubeEnvironment Get(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the properties of a Kubernetes Environment. - /// - /// - /// Description for Get the properties of a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - public static KubeEnvironment CreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - public static void Delete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) - { - operations.DeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - public static KubeEnvironment Update(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope) - { - return operations.UpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironmentPatchResource kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - public static KubeEnvironment BeginCreateOrUpdate(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, kubeEnvironmentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates a Kubernetes Environment. - /// - /// - /// Description for Creates or updates a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// Configuration details of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, KubeEnvironment kubeEnvironmentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, kubeEnvironmentEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - public static void BeginDelete(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name) - { - operations.BeginDeleteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Delete a Kubernetes Environment. - /// - /// - /// Description for Delete a Kubernetes Environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the Kubernetes Environment. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IKubeEnvironmentsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySubscriptionNext(this IKubeEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListBySubscriptionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all Kubernetes Environments for a subscription. - /// - /// - /// Description for Get all Kubernetes Environments for a 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 IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySubscriptionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in 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 IKubeEnvironmentsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all the Kubernetes Environments in a resource group. - /// - /// - /// Description for Get all the Kubernetes Environments in 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 IKubeEnvironmentsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AbnormalTimePeriod.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AbnormalTimePeriod.cs deleted file mode 100644 index 8d3638668527..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AbnormalTimePeriod.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing Abnormal Time Period identified in diagnosis - /// - public partial class AbnormalTimePeriod - { - /// - /// Initializes a new instance of the AbnormalTimePeriod class. - /// - public AbnormalTimePeriod() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AbnormalTimePeriod class. - /// - /// Start time of the downtime - /// End time of the downtime - /// List of Possible Cause of downtime - /// List of proposed solutions - public AbnormalTimePeriod(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList events = default(IList), IList solutions = default(IList)) - { - StartTime = startTime; - EndTime = endTime; - Events = events; - Solutions = solutions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets start time of the downtime - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the downtime - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets list of Possible Cause of downtime - /// - [JsonProperty(PropertyName = "events")] - public IList Events { get; set; } - - /// - /// Gets or sets list of proposed solutions - /// - [JsonProperty(PropertyName = "solutions")] - public IList Solutions { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs deleted file mode 100644 index ec3e601a6a72..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ActiveRevisionsMode.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for ActiveRevisionsMode. - /// - public static class ActiveRevisionsMode - { - public const string Multiple = "multiple"; - public const string Single = "single"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Address.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Address.cs deleted file mode 100644 index 93da3addd3ba..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Address.cs +++ /dev/null @@ -1,122 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Address information for domain registration. - /// - public partial class Address - { - /// - /// Initializes a new instance of the Address class. - /// - public Address() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Address class. - /// - /// First line of an Address. - /// The city for the address. - /// The country for the address. - /// The postal code for the address. - /// The state or province for the address. - /// The second line of the Address. - /// Optional. - public Address(string address1, string city, string country, string postalCode, string state, string address2 = default(string)) - { - Address1 = address1; - Address2 = address2; - City = city; - Country = country; - PostalCode = postalCode; - State = state; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets first line of an Address. - /// - [JsonProperty(PropertyName = "address1")] - public string Address1 { get; set; } - - /// - /// Gets or sets the second line of the Address. Optional. - /// - [JsonProperty(PropertyName = "address2")] - public string Address2 { get; set; } - - /// - /// Gets or sets the city for the address. - /// - [JsonProperty(PropertyName = "city")] - public string City { get; set; } - - /// - /// Gets or sets the country for the address. - /// - [JsonProperty(PropertyName = "country")] - public string Country { get; set; } - - /// - /// Gets or sets the postal code for the address. - /// - [JsonProperty(PropertyName = "postalCode")] - public string PostalCode { get; set; } - - /// - /// Gets or sets the state or province for the address. - /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Address1 == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Address1"); - } - if (City == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "City"); - } - if (Country == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Country"); - } - if (PostalCode == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PostalCode"); - } - if (State == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "State"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AddressResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AddressResponse.cs deleted file mode 100644 index 879dbaad9a28..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AddressResponse.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes main public IP address and any extra virtual IPs. - /// - [Rest.Serialization.JsonTransformation] - public partial class AddressResponse : ProxyOnlyResource - { - /// - /// Initializes a new instance of the AddressResponse class. - /// - public AddressResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AddressResponse class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Main public virtual IP. - /// Virtual Network internal IP address - /// of the App Service Environment if it is in internal load-balancing - /// mode. - /// IP addresses appearing on - /// outbound connections. - /// Additional virtual IPs. - public AddressResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string serviceIpAddress = default(string), string internalIpAddress = default(string), IList outboundIpAddresses = default(IList), IList vipMappings = default(IList)) - : base(id, name, kind, type) - { - ServiceIpAddress = serviceIpAddress; - InternalIpAddress = internalIpAddress; - OutboundIpAddresses = outboundIpAddresses; - VipMappings = vipMappings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets main public virtual IP. - /// - [JsonProperty(PropertyName = "properties.serviceIpAddress")] - public string ServiceIpAddress { get; set; } - - /// - /// Gets or sets virtual Network internal IP address of the App Service - /// Environment if it is in internal load-balancing mode. - /// - [JsonProperty(PropertyName = "properties.internalIpAddress")] - public string InternalIpAddress { get; set; } - - /// - /// Gets or sets IP addresses appearing on outbound connections. - /// - [JsonProperty(PropertyName = "properties.outboundIpAddresses")] - public IList OutboundIpAddresses { get; set; } - - /// - /// Gets or sets additional virtual IPs. - /// - [JsonProperty(PropertyName = "properties.vipMappings")] - public IList VipMappings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs deleted file mode 100644 index 482f69d644e2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedAudiencesValidation.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the Allowed Audiences validation flow. - /// - public partial class AllowedAudiencesValidation - { - /// - /// Initializes a new instance of the AllowedAudiencesValidation class. - /// - public AllowedAudiencesValidation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AllowedAudiencesValidation class. - /// - /// The configuration settings of the - /// allowed list of audiences from which to validate the JWT - /// token. - public AllowedAudiencesValidation(IList allowedAudiences = default(IList)) - { - AllowedAudiences = allowedAudiences; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the configuration settings of the allowed list of - /// audiences from which to validate the JWT token. - /// - [JsonProperty(PropertyName = "allowedAudiences")] - public IList AllowedAudiences { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs deleted file mode 100644 index c7a907bf8b49..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AllowedPrincipals.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the Azure Active Directory allowed - /// principals. - /// - public partial class AllowedPrincipals - { - /// - /// Initializes a new instance of the AllowedPrincipals class. - /// - public AllowedPrincipals() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AllowedPrincipals class. - /// - /// The list of the allowed groups. - /// The list of the allowed - /// identities. - public AllowedPrincipals(IList groups = default(IList), IList identities = default(IList)) - { - Groups = groups; - Identities = identities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of the allowed groups. - /// - [JsonProperty(PropertyName = "groups")] - public IList Groups { get; set; } - - /// - /// Gets or sets the list of the allowed identities. - /// - [JsonProperty(PropertyName = "identities")] - public IList Identities { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisData.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisData.cs deleted file mode 100644 index 2cbb22216f0d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisData.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class Representing Detector Evidence used for analysis - /// - public partial class AnalysisData - { - /// - /// Initializes a new instance of the AnalysisData class. - /// - public AnalysisData() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AnalysisData class. - /// - /// Name of the Detector - /// Detector Definition - /// Source Metrics - /// Additional Source Data - /// Detector Meta Data - public AnalysisData(string source = default(string), DetectorDefinition detectorDefinition = default(DetectorDefinition), IList metrics = default(IList), IList> data = default(IList>), ResponseMetaData detectorMetaData = default(ResponseMetaData)) - { - Source = source; - DetectorDefinition = detectorDefinition; - Metrics = metrics; - Data = data; - DetectorMetaData = detectorMetaData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the Detector - /// - [JsonProperty(PropertyName = "source")] - public string Source { get; set; } - - /// - /// Gets or sets detector Definition - /// - [JsonProperty(PropertyName = "detectorDefinition")] - public DetectorDefinition DetectorDefinition { get; set; } - - /// - /// Gets or sets source Metrics - /// - [JsonProperty(PropertyName = "metrics")] - public IList Metrics { get; set; } - - /// - /// Gets or sets additional Source Data - /// - [JsonProperty(PropertyName = "data")] - public IList> Data { get; set; } - - /// - /// Gets or sets detector Meta Data - /// - [JsonProperty(PropertyName = "detectorMetaData")] - public ResponseMetaData DetectorMetaData { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisDefinition.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisDefinition.cs deleted file mode 100644 index 69956364b44c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AnalysisDefinition.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Definition of Analysis - /// - [Rest.Serialization.JsonTransformation] - public partial class AnalysisDefinition : ProxyOnlyResource - { - /// - /// Initializes a new instance of the AnalysisDefinition class. - /// - public AnalysisDefinition() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AnalysisDefinition class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Description of the Analysis - public AnalysisDefinition(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string description = default(string)) - : base(id, name, kind, type) - { - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets description of the Analysis - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiDefinitionInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiDefinitionInfo.cs deleted file mode 100644 index 76e5be22e2fb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiDefinitionInfo.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information about the formal API definition for the app. - /// - public partial class ApiDefinitionInfo - { - /// - /// Initializes a new instance of the ApiDefinitionInfo class. - /// - public ApiDefinitionInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApiDefinitionInfo class. - /// - /// The URL of the API definition. - public ApiDefinitionInfo(string url = default(string)) - { - Url = url; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the URL of the API definition. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs deleted file mode 100644 index bfd067ed6a02..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiKVReference.cs +++ /dev/null @@ -1,117 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description of site key vault references. - /// - [Rest.Serialization.JsonTransformation] - public partial class ApiKVReference : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ApiKVReference class. - /// - public ApiKVReference() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApiKVReference class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Possible values include: 'Initialized', - /// 'Resolved', 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', - /// 'SecretNotFound', 'SecretVersionNotFound', - /// 'AccessToKeyVaultDenied', 'OtherReasons', 'FetchTimedOut', - /// 'UnauthorizedClient' - /// Possible values include: 'KeyVault' - public ApiKVReference(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string reference = default(string), ResolveStatus? status = default(ResolveStatus?), string vaultName = default(string), string secretName = default(string), string secretVersion = default(string), ManagedServiceIdentity identityType = default(ManagedServiceIdentity), string details = default(string), ConfigReferenceSource? source = default(ConfigReferenceSource?), string activeVersion = default(string)) - : base(id, name, kind, type) - { - Reference = reference; - Status = status; - VaultName = vaultName; - SecretName = secretName; - SecretVersion = secretVersion; - IdentityType = identityType; - Details = details; - Source = source; - ActiveVersion = activeVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.reference")] - public string Reference { get; set; } - - /// - /// Gets or sets possible values include: 'Initialized', 'Resolved', - /// 'InvalidSyntax', 'MSINotEnabled', 'VaultNotFound', - /// 'SecretNotFound', 'SecretVersionNotFound', - /// 'AccessToKeyVaultDenied', 'OtherReasons', 'FetchTimedOut', - /// 'UnauthorizedClient' - /// - [JsonProperty(PropertyName = "properties.status")] - public ResolveStatus? Status { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.vaultName")] - public string VaultName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.secretName")] - public string SecretName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.secretVersion")] - public string SecretVersion { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.identityType")] - public ManagedServiceIdentity IdentityType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.details")] - public string Details { get; set; } - - /// - /// Gets or sets possible values include: 'KeyVault' - /// - [JsonProperty(PropertyName = "properties.source")] - public ConfigReferenceSource? Source { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.activeVersion")] - public string ActiveVersion { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiManagementConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiManagementConfig.cs deleted file mode 100644 index 2b6bf8637dc2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApiManagementConfig.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Azure API management (APIM) configuration linked to the app. - /// - public partial class ApiManagementConfig - { - /// - /// Initializes a new instance of the ApiManagementConfig class. - /// - public ApiManagementConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApiManagementConfig class. - /// - /// APIM-Api Identifier. - public ApiManagementConfig(string id = default(string)) - { - Id = id; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets aPIM-Api Identifier. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs deleted file mode 100644 index ba4ae64ca04e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppInsightsWebAppStackSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// App Insights Web App stack settings. - /// - public partial class AppInsightsWebAppStackSettings - { - /// - /// Initializes a new instance of the AppInsightsWebAppStackSettings - /// class. - /// - public AppInsightsWebAppStackSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppInsightsWebAppStackSettings - /// class. - /// - /// <code>true</code> if remote - /// Application Insights is supported for the stack; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// Application Insights is disabled by default for the stack; - /// otherwise, <code>false</code>. - public AppInsightsWebAppStackSettings(bool? isSupported = default(bool?), bool? isDefaultOff = default(bool?)) - { - IsSupported = isSupported; - IsDefaultOff = isDefaultOff; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if remote - /// Application Insights is supported for the stack; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isSupported")] - public bool? IsSupported { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if Application - /// Insights is disabled by default for the stack; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDefaultOff")] - public bool? IsDefaultOff { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs deleted file mode 100644 index a1deb095dbf0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppLogsConfiguration.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class AppLogsConfiguration - { - /// - /// Initializes a new instance of the AppLogsConfiguration class. - /// - public AppLogsConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppLogsConfiguration class. - /// - public AppLogsConfiguration(string destination = default(string), LogAnalyticsConfiguration logAnalyticsConfiguration = default(LogAnalyticsConfiguration)) - { - Destination = destination; - LogAnalyticsConfiguration = logAnalyticsConfiguration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "destination")] - public string Destination { get; set; } - - /// - /// - [JsonProperty(PropertyName = "logAnalyticsConfiguration")] - public LogAnalyticsConfiguration LogAnalyticsConfiguration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs deleted file mode 100644 index 54ddc2043ed4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppRegistration.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the app registration for providers that - /// have app ids and app secrets - /// - public partial class AppRegistration - { - /// - /// Initializes a new instance of the AppRegistration class. - /// - public AppRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppRegistration class. - /// - /// The App ID of the app used for login. - /// The app setting name that - /// contains the app secret. - public AppRegistration(string appId = default(string), string appSecretSettingName = default(string)) - { - AppId = appId; - AppSecretSettingName = appSecretSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the App ID of the app used for login. - /// - [JsonProperty(PropertyName = "appId")] - public string AppId { get; set; } - - /// - /// Gets or sets the app setting name that contains the app secret. - /// - [JsonProperty(PropertyName = "appSecretSettingName")] - public string AppSecretSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificate.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificate.cs deleted file mode 100644 index 0f89676c64ac..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificate.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Key Vault container for a certificate that is purchased through Azure. - /// - public partial class AppServiceCertificate - { - /// - /// Initializes a new instance of the AppServiceCertificate class. - /// - public AppServiceCertificate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServiceCertificate class. - /// - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Possible values include: 'Initialized', - /// 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', - /// 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - public AppServiceCertificate(string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? provisioningState = default(KeyVaultSecretStatus?)) - { - KeyVaultId = keyVaultId; - KeyVaultSecretName = keyVaultSecretName; - ProvisioningState = provisioningState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets key Vault resource Id. - /// - [JsonProperty(PropertyName = "keyVaultId")] - public string KeyVaultId { get; set; } - - /// - /// Gets or sets key Vault secret name. - /// - [JsonProperty(PropertyName = "keyVaultSecretName")] - public string KeyVaultSecretName { get; set; } - - /// - /// Gets status of the Key Vault secret. Possible values include: - /// 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', - /// 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "provisioningState")] - public KeyVaultSecretStatus? ProvisioningState { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs deleted file mode 100644 index aee5531d6910..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrder.cs +++ /dev/null @@ -1,254 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// SSL certificate purchase order. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceCertificateOrder : Resource - { - /// - /// Initializes a new instance of the AppServiceCertificateOrder class. - /// - public AppServiceCertificateOrder() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServiceCertificateOrder class. - /// - /// Resource Location. - /// Certificate product type. Possible values - /// include: 'StandardDomainValidatedSsl', - /// 'StandardDomainValidatedWildCardSsl' - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// State of the Key Vault secret. - /// Certificate distinguished - /// name. - /// Domain verification - /// token. - /// Duration in years (must be - /// 1). - /// Certificate key size. - /// <code>true</code> if the - /// certificate should be automatically renewed when it expires; - /// otherwise, <code>false</code>. - /// Status of certificate order. - /// Possible values include: 'Succeeded', 'Failed', 'Canceled', - /// 'InProgress', 'Deleting' - /// Current order status. Possible values include: - /// 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', - /// 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', - /// 'NotSubmitted' - /// Signed certificate. - /// Last CSR that was created for this order. - /// Intermediate certificate. - /// Root certificate. - /// Current serial number of the - /// certificate. - /// Certificate last issuance - /// time. - /// Certificate expiration time. - /// <code>true</code> if - /// private key is external; otherwise, - /// <code>false</code>. - /// Reasons why - /// App Service Certificate is not renewable at the current - /// moment. - /// Time stamp when the - /// certificate would be auto renewed next - /// Contact info - public AppServiceCertificateOrder(string location, CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?), CertificateOrderContact contact = default(CertificateOrderContact)) - : base(location, id, name, kind, type, tags) - { - Certificates = certificates; - DistinguishedName = distinguishedName; - DomainVerificationToken = domainVerificationToken; - ValidityInYears = validityInYears; - KeySize = keySize; - ProductType = productType; - AutoRenew = autoRenew; - ProvisioningState = provisioningState; - Status = status; - SignedCertificate = signedCertificate; - Csr = csr; - Intermediate = intermediate; - Root = root; - SerialNumber = serialNumber; - LastCertificateIssuanceTime = lastCertificateIssuanceTime; - ExpirationTime = expirationTime; - IsPrivateKeyExternal = isPrivateKeyExternal; - AppServiceCertificateNotRenewableReasons = appServiceCertificateNotRenewableReasons; - NextAutoRenewalTimeStamp = nextAutoRenewalTimeStamp; - Contact = contact; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets state of the Key Vault secret. - /// - [JsonProperty(PropertyName = "properties.certificates")] - public IDictionary Certificates { get; set; } - - /// - /// Gets or sets certificate distinguished name. - /// - [JsonProperty(PropertyName = "properties.distinguishedName")] - public string DistinguishedName { get; set; } - - /// - /// Gets domain verification token. - /// - [JsonProperty(PropertyName = "properties.domainVerificationToken")] - public string DomainVerificationToken { get; private set; } - - /// - /// Gets or sets duration in years (must be 1). - /// - [JsonProperty(PropertyName = "properties.validityInYears")] - public int? ValidityInYears { get; set; } - - /// - /// Gets or sets certificate key size. - /// - [JsonProperty(PropertyName = "properties.keySize")] - public int? KeySize { get; set; } - - /// - /// Gets or sets certificate product type. Possible values include: - /// 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' - /// - [JsonProperty(PropertyName = "properties.productType")] - public CertificateProductType ProductType { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// certificate should be automatically renewed when it expires; - /// otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.autoRenew")] - public bool? AutoRenew { get; set; } - - /// - /// Gets status of certificate order. Possible values include: - /// 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets current order status. Possible values include: - /// 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', - /// 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', - /// 'NotSubmitted' - /// - [JsonProperty(PropertyName = "properties.status")] - public CertificateOrderStatus? Status { get; private set; } - - /// - /// Gets signed certificate. - /// - [JsonProperty(PropertyName = "properties.signedCertificate")] - public CertificateDetails SignedCertificate { get; private set; } - - /// - /// Gets or sets last CSR that was created for this order. - /// - [JsonProperty(PropertyName = "properties.csr")] - public string Csr { get; set; } - - /// - /// Gets intermediate certificate. - /// - [JsonProperty(PropertyName = "properties.intermediate")] - public CertificateDetails Intermediate { get; private set; } - - /// - /// Gets root certificate. - /// - [JsonProperty(PropertyName = "properties.root")] - public CertificateDetails Root { get; private set; } - - /// - /// Gets current serial number of the certificate. - /// - [JsonProperty(PropertyName = "properties.serialNumber")] - public string SerialNumber { get; private set; } - - /// - /// Gets certificate last issuance time. - /// - [JsonProperty(PropertyName = "properties.lastCertificateIssuanceTime")] - public System.DateTime? LastCertificateIssuanceTime { get; private set; } - - /// - /// Gets certificate expiration time. - /// - [JsonProperty(PropertyName = "properties.expirationTime")] - public System.DateTime? ExpirationTime { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if private key - /// is external; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isPrivateKeyExternal")] - public bool? IsPrivateKeyExternal { get; private set; } - - /// - /// Gets reasons why App Service Certificate is not renewable at the - /// current moment. - /// - [JsonProperty(PropertyName = "properties.appServiceCertificateNotRenewableReasons")] - public IList AppServiceCertificateNotRenewableReasons { get; private set; } - - /// - /// Gets time stamp when the certificate would be auto renewed next - /// - [JsonProperty(PropertyName = "properties.nextAutoRenewalTimeStamp")] - public System.DateTime? NextAutoRenewalTimeStamp { get; private set; } - - /// - /// Gets contact info - /// - [JsonProperty(PropertyName = "properties.contact")] - public CertificateOrderContact Contact { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs deleted file mode 100644 index 0badb4580486..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateOrderPatchResource.cs +++ /dev/null @@ -1,253 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a certificate order that is purchased through Azure. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceCertificateOrderPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// AppServiceCertificateOrderPatchResource class. - /// - public AppServiceCertificateOrderPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AppServiceCertificateOrderPatchResource class. - /// - /// Certificate product type. Possible values - /// include: 'StandardDomainValidatedSsl', - /// 'StandardDomainValidatedWildCardSsl' - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// State of the Key Vault secret. - /// Certificate distinguished - /// name. - /// Domain verification - /// token. - /// Duration in years (must be - /// 1). - /// Certificate key size. - /// <code>true</code> if the - /// certificate should be automatically renewed when it expires; - /// otherwise, <code>false</code>. - /// Status of certificate order. - /// Possible values include: 'Succeeded', 'Failed', 'Canceled', - /// 'InProgress', 'Deleting' - /// Current order status. Possible values include: - /// 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', - /// 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', - /// 'NotSubmitted' - /// Signed certificate. - /// Last CSR that was created for this order. - /// Intermediate certificate. - /// Root certificate. - /// Current serial number of the - /// certificate. - /// Certificate last issuance - /// time. - /// Certificate expiration time. - /// <code>true</code> if - /// private key is external; otherwise, - /// <code>false</code>. - /// Reasons why - /// App Service Certificate is not renewable at the current - /// moment. - /// Time stamp when the - /// certificate would be auto renewed next - /// Contact info - public AppServiceCertificateOrderPatchResource(CertificateProductType productType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary certificates = default(IDictionary), string distinguishedName = default(string), string domainVerificationToken = default(string), int? validityInYears = default(int?), int? keySize = default(int?), bool? autoRenew = default(bool?), ProvisioningState? provisioningState = default(ProvisioningState?), CertificateOrderStatus? status = default(CertificateOrderStatus?), CertificateDetails signedCertificate = default(CertificateDetails), string csr = default(string), CertificateDetails intermediate = default(CertificateDetails), CertificateDetails root = default(CertificateDetails), string serialNumber = default(string), System.DateTime? lastCertificateIssuanceTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), bool? isPrivateKeyExternal = default(bool?), IList appServiceCertificateNotRenewableReasons = default(IList), System.DateTime? nextAutoRenewalTimeStamp = default(System.DateTime?), CertificateOrderContact contact = default(CertificateOrderContact)) - : base(id, name, kind, type) - { - Certificates = certificates; - DistinguishedName = distinguishedName; - DomainVerificationToken = domainVerificationToken; - ValidityInYears = validityInYears; - KeySize = keySize; - ProductType = productType; - AutoRenew = autoRenew; - ProvisioningState = provisioningState; - Status = status; - SignedCertificate = signedCertificate; - Csr = csr; - Intermediate = intermediate; - Root = root; - SerialNumber = serialNumber; - LastCertificateIssuanceTime = lastCertificateIssuanceTime; - ExpirationTime = expirationTime; - IsPrivateKeyExternal = isPrivateKeyExternal; - AppServiceCertificateNotRenewableReasons = appServiceCertificateNotRenewableReasons; - NextAutoRenewalTimeStamp = nextAutoRenewalTimeStamp; - Contact = contact; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets state of the Key Vault secret. - /// - [JsonProperty(PropertyName = "properties.certificates")] - public IDictionary Certificates { get; set; } - - /// - /// Gets or sets certificate distinguished name. - /// - [JsonProperty(PropertyName = "properties.distinguishedName")] - public string DistinguishedName { get; set; } - - /// - /// Gets domain verification token. - /// - [JsonProperty(PropertyName = "properties.domainVerificationToken")] - public string DomainVerificationToken { get; private set; } - - /// - /// Gets or sets duration in years (must be 1). - /// - [JsonProperty(PropertyName = "properties.validityInYears")] - public int? ValidityInYears { get; set; } - - /// - /// Gets or sets certificate key size. - /// - [JsonProperty(PropertyName = "properties.keySize")] - public int? KeySize { get; set; } - - /// - /// Gets or sets certificate product type. Possible values include: - /// 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' - /// - [JsonProperty(PropertyName = "properties.productType")] - public CertificateProductType ProductType { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// certificate should be automatically renewed when it expires; - /// otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.autoRenew")] - public bool? AutoRenew { get; set; } - - /// - /// Gets status of certificate order. Possible values include: - /// 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets current order status. Possible values include: - /// 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', - /// 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', - /// 'NotSubmitted' - /// - [JsonProperty(PropertyName = "properties.status")] - public CertificateOrderStatus? Status { get; private set; } - - /// - /// Gets signed certificate. - /// - [JsonProperty(PropertyName = "properties.signedCertificate")] - public CertificateDetails SignedCertificate { get; private set; } - - /// - /// Gets or sets last CSR that was created for this order. - /// - [JsonProperty(PropertyName = "properties.csr")] - public string Csr { get; set; } - - /// - /// Gets intermediate certificate. - /// - [JsonProperty(PropertyName = "properties.intermediate")] - public CertificateDetails Intermediate { get; private set; } - - /// - /// Gets root certificate. - /// - [JsonProperty(PropertyName = "properties.root")] - public CertificateDetails Root { get; private set; } - - /// - /// Gets current serial number of the certificate. - /// - [JsonProperty(PropertyName = "properties.serialNumber")] - public string SerialNumber { get; private set; } - - /// - /// Gets certificate last issuance time. - /// - [JsonProperty(PropertyName = "properties.lastCertificateIssuanceTime")] - public System.DateTime? LastCertificateIssuanceTime { get; private set; } - - /// - /// Gets certificate expiration time. - /// - [JsonProperty(PropertyName = "properties.expirationTime")] - public System.DateTime? ExpirationTime { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if private key - /// is external; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isPrivateKeyExternal")] - public bool? IsPrivateKeyExternal { get; private set; } - - /// - /// Gets reasons why App Service Certificate is not renewable at the - /// current moment. - /// - [JsonProperty(PropertyName = "properties.appServiceCertificateNotRenewableReasons")] - public IList AppServiceCertificateNotRenewableReasons { get; private set; } - - /// - /// Gets time stamp when the certificate would be auto renewed next - /// - [JsonProperty(PropertyName = "properties.nextAutoRenewalTimeStamp")] - public System.DateTime? NextAutoRenewalTimeStamp { get; private set; } - - /// - /// Gets contact info - /// - [JsonProperty(PropertyName = "properties.contact")] - public CertificateOrderContact Contact { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificatePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificatePatchResource.cs deleted file mode 100644 index cabf8228ef12..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificatePatchResource.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Key Vault container ARM resource for a certificate that is purchased - /// through Azure. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceCertificatePatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// AppServiceCertificatePatchResource class. - /// - public AppServiceCertificatePatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AppServiceCertificatePatchResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Possible values include: 'Initialized', - /// 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', - /// 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - public AppServiceCertificatePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? provisioningState = default(KeyVaultSecretStatus?)) - : base(id, name, kind, type) - { - KeyVaultId = keyVaultId; - KeyVaultSecretName = keyVaultSecretName; - ProvisioningState = provisioningState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets key Vault resource Id. - /// - [JsonProperty(PropertyName = "properties.keyVaultId")] - public string KeyVaultId { get; set; } - - /// - /// Gets or sets key Vault secret name. - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretName")] - public string KeyVaultSecretName { get; set; } - - /// - /// Gets status of the Key Vault secret. Possible values include: - /// 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', - /// 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public KeyVaultSecretStatus? ProvisioningState { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateResource.cs deleted file mode 100644 index a9b3c95a4df4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceCertificateResource.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Key Vault container ARM resource for a certificate that is purchased - /// through Azure. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceCertificateResource : Resource - { - /// - /// Initializes a new instance of the AppServiceCertificateResource - /// class. - /// - public AppServiceCertificateResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServiceCertificateResource - /// class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Key Vault resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Possible values include: 'Initialized', - /// 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', - /// 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - public AppServiceCertificateResource(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? provisioningState = default(KeyVaultSecretStatus?)) - : base(location, id, name, kind, type, tags) - { - KeyVaultId = keyVaultId; - KeyVaultSecretName = keyVaultSecretName; - ProvisioningState = provisioningState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets key Vault resource Id. - /// - [JsonProperty(PropertyName = "properties.keyVaultId")] - public string KeyVaultId { get; set; } - - /// - /// Gets or sets key Vault secret name. - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretName")] - public string KeyVaultSecretName { get; set; } - - /// - /// Gets status of the Key Vault secret. Possible values include: - /// 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', - /// 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public KeyVaultSecretStatus? ProvisioningState { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs deleted file mode 100644 index 58cd6e695e99..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironment.cs +++ /dev/null @@ -1,225 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of an App Service Environment. - /// - public partial class AppServiceEnvironment - { - /// - /// Initializes a new instance of the AppServiceEnvironment class. - /// - public AppServiceEnvironment() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServiceEnvironment class. - /// - /// Description of the Virtual - /// Network. - /// Provisioning state of the App - /// Service Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// Current status of the App Service Environment. - /// Possible values include: 'Preparing', 'Ready', 'Scaling', - /// 'Deleting' - /// Specifies which endpoints - /// to serve internally in the Virtual Network for the App Service - /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web, Publishing' - /// Front-end VM size, e.g. "Medium", - /// "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved - /// for the App Service Environment. - /// DNS suffix of the App Service - /// Environment. - /// Maximum number of VMs in the - /// App Service Environment. - /// Scale factor for - /// front-ends. - /// <code>true</code> if the App - /// Service Environment is suspended; otherwise, - /// <code>false</code>. The environment can be suspended, - /// e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// Custom settings for changing the - /// behavior of the App Service Environment. - /// User added ip ranges to - /// whitelist on ASE db - /// Flag that displays whether an ASE has - /// linux workers or not - /// Dedicated Host Count - /// Whether or not this App Service - /// Environment is zone-redundant. - public AppServiceEnvironment(VirtualNetworkProfile virtualNetwork, ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) - { - ProvisioningState = provisioningState; - Status = status; - VirtualNetwork = virtualNetwork; - InternalLoadBalancingMode = internalLoadBalancingMode; - MultiSize = multiSize; - MultiRoleCount = multiRoleCount; - IpsslAddressCount = ipsslAddressCount; - DnsSuffix = dnsSuffix; - MaximumNumberOfMachines = maximumNumberOfMachines; - FrontEndScaleFactor = frontEndScaleFactor; - Suspended = suspended; - ClusterSettings = clusterSettings; - UserWhitelistedIpRanges = userWhitelistedIpRanges; - HasLinuxWorkers = hasLinuxWorkers; - DedicatedHostCount = dedicatedHostCount; - ZoneRedundant = zoneRedundant; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the App Service Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets current status of the App Service Environment. Possible values - /// include: 'Preparing', 'Ready', 'Scaling', 'Deleting' - /// - [JsonProperty(PropertyName = "status")] - public HostingEnvironmentStatus? Status { get; private set; } - - /// - /// Gets or sets description of the Virtual Network. - /// - [JsonProperty(PropertyName = "virtualNetwork")] - public VirtualNetworkProfile VirtualNetwork { get; set; } - - /// - /// Gets or sets specifies which endpoints to serve internally in the - /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' - /// - [JsonProperty(PropertyName = "internalLoadBalancingMode")] - public string InternalLoadBalancingMode { get; set; } - - /// - /// Gets or sets front-end VM size, e.g. "Medium", "Large". - /// - [JsonProperty(PropertyName = "multiSize")] - public string MultiSize { get; set; } - - /// - /// Gets number of front-end instances. - /// - [JsonProperty(PropertyName = "multiRoleCount")] - public int? MultiRoleCount { get; private set; } - - /// - /// Gets or sets number of IP SSL addresses reserved for the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "ipsslAddressCount")] - public int? IpsslAddressCount { get; set; } - - /// - /// Gets or sets DNS suffix of the App Service Environment. - /// - [JsonProperty(PropertyName = "dnsSuffix")] - public string DnsSuffix { get; set; } - - /// - /// Gets maximum number of VMs in the App Service Environment. - /// - [JsonProperty(PropertyName = "maximumNumberOfMachines")] - public int? MaximumNumberOfMachines { get; private set; } - - /// - /// Gets or sets scale factor for front-ends. - /// - [JsonProperty(PropertyName = "frontEndScaleFactor")] - public int? FrontEndScaleFactor { get; set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the App - /// Service Environment is suspended; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. The environment can - /// be suspended, e.g. when the management endpoint is no longer - /// available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "suspended")] - public bool? Suspended { get; private set; } - - /// - /// Gets or sets custom settings for changing the behavior of the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "clusterSettings")] - public IList ClusterSettings { get; set; } - - /// - /// Gets or sets user added ip ranges to whitelist on ASE db - /// - [JsonProperty(PropertyName = "userWhitelistedIpRanges")] - public IList UserWhitelistedIpRanges { get; set; } - - /// - /// Gets flag that displays whether an ASE has linux workers or not - /// - [JsonProperty(PropertyName = "hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; private set; } - - /// - /// Gets or sets dedicated Host Count - /// - [JsonProperty(PropertyName = "dedicatedHostCount")] - public int? DedicatedHostCount { get; set; } - - /// - /// Gets or sets whether or not this App Service Environment is - /// zone-redundant. - /// - [JsonProperty(PropertyName = "zoneRedundant")] - public bool? ZoneRedundant { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (VirtualNetwork == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); - } - if (VirtualNetwork != null) - { - VirtualNetwork.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs deleted file mode 100644 index 261e17cc4c7a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentPatchResource.cs +++ /dev/null @@ -1,234 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a app service environment. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceEnvironmentPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// AppServiceEnvironmentPatchResource class. - /// - public AppServiceEnvironmentPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AppServiceEnvironmentPatchResource class. - /// - /// Description of the Virtual - /// Network. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Provisioning state of the App - /// Service Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// Current status of the App Service Environment. - /// Possible values include: 'Preparing', 'Ready', 'Scaling', - /// 'Deleting' - /// Specifies which endpoints - /// to serve internally in the Virtual Network for the App Service - /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web, Publishing' - /// Front-end VM size, e.g. "Medium", - /// "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved - /// for the App Service Environment. - /// DNS suffix of the App Service - /// Environment. - /// Maximum number of VMs in the - /// App Service Environment. - /// Scale factor for - /// front-ends. - /// <code>true</code> if the App - /// Service Environment is suspended; otherwise, - /// <code>false</code>. The environment can be suspended, - /// e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// Custom settings for changing the - /// behavior of the App Service Environment. - /// User added ip ranges to - /// whitelist on ASE db - /// Flag that displays whether an ASE has - /// linux workers or not - /// Dedicated Host Count - /// Whether or not this App Service - /// Environment is zone-redundant. - public AppServiceEnvironmentPatchResource(VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) - : base(id, name, kind, type) - { - ProvisioningState = provisioningState; - Status = status; - VirtualNetwork = virtualNetwork; - InternalLoadBalancingMode = internalLoadBalancingMode; - MultiSize = multiSize; - MultiRoleCount = multiRoleCount; - IpsslAddressCount = ipsslAddressCount; - DnsSuffix = dnsSuffix; - MaximumNumberOfMachines = maximumNumberOfMachines; - FrontEndScaleFactor = frontEndScaleFactor; - Suspended = suspended; - ClusterSettings = clusterSettings; - UserWhitelistedIpRanges = userWhitelistedIpRanges; - HasLinuxWorkers = hasLinuxWorkers; - DedicatedHostCount = dedicatedHostCount; - ZoneRedundant = zoneRedundant; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the App Service Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets current status of the App Service Environment. Possible values - /// include: 'Preparing', 'Ready', 'Scaling', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.status")] - public HostingEnvironmentStatus? Status { get; private set; } - - /// - /// Gets or sets description of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.virtualNetwork")] - public VirtualNetworkProfile VirtualNetwork { get; set; } - - /// - /// Gets or sets specifies which endpoints to serve internally in the - /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' - /// - [JsonProperty(PropertyName = "properties.internalLoadBalancingMode")] - public string InternalLoadBalancingMode { get; set; } - - /// - /// Gets or sets front-end VM size, e.g. "Medium", "Large". - /// - [JsonProperty(PropertyName = "properties.multiSize")] - public string MultiSize { get; set; } - - /// - /// Gets number of front-end instances. - /// - [JsonProperty(PropertyName = "properties.multiRoleCount")] - public int? MultiRoleCount { get; private set; } - - /// - /// Gets or sets number of IP SSL addresses reserved for the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.ipsslAddressCount")] - public int? IpsslAddressCount { get; set; } - - /// - /// Gets or sets DNS suffix of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.dnsSuffix")] - public string DnsSuffix { get; set; } - - /// - /// Gets maximum number of VMs in the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.maximumNumberOfMachines")] - public int? MaximumNumberOfMachines { get; private set; } - - /// - /// Gets or sets scale factor for front-ends. - /// - [JsonProperty(PropertyName = "properties.frontEndScaleFactor")] - public int? FrontEndScaleFactor { get; set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the App - /// Service Environment is suspended; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. The environment can - /// be suspended, e.g. when the management endpoint is no longer - /// available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "properties.suspended")] - public bool? Suspended { get; private set; } - - /// - /// Gets or sets custom settings for changing the behavior of the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.clusterSettings")] - public IList ClusterSettings { get; set; } - - /// - /// Gets or sets user added ip ranges to whitelist on ASE db - /// - [JsonProperty(PropertyName = "properties.userWhitelistedIpRanges")] - public IList UserWhitelistedIpRanges { get; set; } - - /// - /// Gets flag that displays whether an ASE has linux workers or not - /// - [JsonProperty(PropertyName = "properties.hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; private set; } - - /// - /// Gets or sets dedicated Host Count - /// - [JsonProperty(PropertyName = "properties.dedicatedHostCount")] - public int? DedicatedHostCount { get; set; } - - /// - /// Gets or sets whether or not this App Service Environment is - /// zone-redundant. - /// - [JsonProperty(PropertyName = "properties.zoneRedundant")] - public bool? ZoneRedundant { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (VirtualNetwork == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); - } - if (VirtualNetwork != null) - { - VirtualNetwork.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs deleted file mode 100644 index 97d49000082f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServiceEnvironmentResource.cs +++ /dev/null @@ -1,237 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// App Service Environment ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServiceEnvironmentResource : Resource - { - /// - /// Initializes a new instance of the AppServiceEnvironmentResource - /// class. - /// - public AppServiceEnvironmentResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServiceEnvironmentResource - /// class. - /// - /// Resource Location. - /// Description of the Virtual - /// Network. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Provisioning state of the App - /// Service Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// Current status of the App Service Environment. - /// Possible values include: 'Preparing', 'Ready', 'Scaling', - /// 'Deleting' - /// Specifies which endpoints - /// to serve internally in the Virtual Network for the App Service - /// Environment. Possible values include: 'None', 'Web', 'Publishing', - /// 'Web, Publishing' - /// Front-end VM size, e.g. "Medium", - /// "Large". - /// Number of front-end instances. - /// Number of IP SSL addresses reserved - /// for the App Service Environment. - /// DNS suffix of the App Service - /// Environment. - /// Maximum number of VMs in the - /// App Service Environment. - /// Scale factor for - /// front-ends. - /// <code>true</code> if the App - /// Service Environment is suspended; otherwise, - /// <code>false</code>. The environment can be suspended, - /// e.g. when the management endpoint is no longer available - /// (most likely because NSG blocked the incoming traffic). - /// Custom settings for changing the - /// behavior of the App Service Environment. - /// User added ip ranges to - /// whitelist on ASE db - /// Flag that displays whether an ASE has - /// linux workers or not - /// Dedicated Host Count - /// Whether or not this App Service - /// Environment is zone-redundant. - public AppServiceEnvironmentResource(string location, VirtualNetworkProfile virtualNetwork, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), ProvisioningState? provisioningState = default(ProvisioningState?), HostingEnvironmentStatus? status = default(HostingEnvironmentStatus?), string internalLoadBalancingMode = default(string), string multiSize = default(string), int? multiRoleCount = default(int?), int? ipsslAddressCount = default(int?), string dnsSuffix = default(string), int? maximumNumberOfMachines = default(int?), int? frontEndScaleFactor = default(int?), bool? suspended = default(bool?), IList clusterSettings = default(IList), IList userWhitelistedIpRanges = default(IList), bool? hasLinuxWorkers = default(bool?), int? dedicatedHostCount = default(int?), bool? zoneRedundant = default(bool?)) - : base(location, id, name, kind, type, tags) - { - ProvisioningState = provisioningState; - Status = status; - VirtualNetwork = virtualNetwork; - InternalLoadBalancingMode = internalLoadBalancingMode; - MultiSize = multiSize; - MultiRoleCount = multiRoleCount; - IpsslAddressCount = ipsslAddressCount; - DnsSuffix = dnsSuffix; - MaximumNumberOfMachines = maximumNumberOfMachines; - FrontEndScaleFactor = frontEndScaleFactor; - Suspended = suspended; - ClusterSettings = clusterSettings; - UserWhitelistedIpRanges = userWhitelistedIpRanges; - HasLinuxWorkers = hasLinuxWorkers; - DedicatedHostCount = dedicatedHostCount; - ZoneRedundant = zoneRedundant; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the App Service Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets current status of the App Service Environment. Possible values - /// include: 'Preparing', 'Ready', 'Scaling', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.status")] - public HostingEnvironmentStatus? Status { get; private set; } - - /// - /// Gets or sets description of the Virtual Network. - /// - [JsonProperty(PropertyName = "properties.virtualNetwork")] - public VirtualNetworkProfile VirtualNetwork { get; set; } - - /// - /// Gets or sets specifies which endpoints to serve internally in the - /// Virtual Network for the App Service Environment. Possible values - /// include: 'None', 'Web', 'Publishing', 'Web, Publishing' - /// - [JsonProperty(PropertyName = "properties.internalLoadBalancingMode")] - public string InternalLoadBalancingMode { get; set; } - - /// - /// Gets or sets front-end VM size, e.g. "Medium", "Large". - /// - [JsonProperty(PropertyName = "properties.multiSize")] - public string MultiSize { get; set; } - - /// - /// Gets number of front-end instances. - /// - [JsonProperty(PropertyName = "properties.multiRoleCount")] - public int? MultiRoleCount { get; private set; } - - /// - /// Gets or sets number of IP SSL addresses reserved for the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.ipsslAddressCount")] - public int? IpsslAddressCount { get; set; } - - /// - /// Gets or sets DNS suffix of the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.dnsSuffix")] - public string DnsSuffix { get; set; } - - /// - /// Gets maximum number of VMs in the App Service Environment. - /// - [JsonProperty(PropertyName = "properties.maximumNumberOfMachines")] - public int? MaximumNumberOfMachines { get; private set; } - - /// - /// Gets or sets scale factor for front-ends. - /// - [JsonProperty(PropertyName = "properties.frontEndScaleFactor")] - public int? FrontEndScaleFactor { get; set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the App - /// Service Environment is suspended; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. The environment can - /// be suspended, e.g. when the management endpoint is no longer - /// available - /// (most likely because NSG blocked the incoming traffic). - /// - [JsonProperty(PropertyName = "properties.suspended")] - public bool? Suspended { get; private set; } - - /// - /// Gets or sets custom settings for changing the behavior of the App - /// Service Environment. - /// - [JsonProperty(PropertyName = "properties.clusterSettings")] - public IList ClusterSettings { get; set; } - - /// - /// Gets or sets user added ip ranges to whitelist on ASE db - /// - [JsonProperty(PropertyName = "properties.userWhitelistedIpRanges")] - public IList UserWhitelistedIpRanges { get; set; } - - /// - /// Gets flag that displays whether an ASE has linux workers or not - /// - [JsonProperty(PropertyName = "properties.hasLinuxWorkers")] - public bool? HasLinuxWorkers { get; private set; } - - /// - /// Gets or sets dedicated Host Count - /// - [JsonProperty(PropertyName = "properties.dedicatedHostCount")] - public int? DedicatedHostCount { get; set; } - - /// - /// Gets or sets whether or not this App Service Environment is - /// zone-redundant. - /// - [JsonProperty(PropertyName = "properties.zoneRedundant")] - public bool? ZoneRedundant { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (VirtualNetwork == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VirtualNetwork"); - } - if (VirtualNetwork != null) - { - VirtualNetwork.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs deleted file mode 100644 index 5fe15c31b85f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlan.cs +++ /dev/null @@ -1,304 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// App Service plan. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServicePlan : Resource - { - /// - /// Initializes a new instance of the AppServicePlan class. - /// - public AppServicePlan() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServicePlan class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Target worker tier assigned to the App - /// Service plan. - /// App Service plan status. Possible values - /// include: 'Ready', 'Pending', 'Creating' - /// App Service plan subscription. - /// Specification for the App - /// Service Environment to use for the App Service plan. - /// Maximum number of instances - /// that can be assigned to this App Service plan. - /// Geographical location for the App Service - /// plan. - /// If <code>true</code>, apps - /// assigned to this App Service plan can be scaled independently. - /// If <code>false</code>, apps assigned to this App - /// Service plan will scale to all instances of the plan. - /// ServerFarm supports ElasticScale. - /// Apps in this plan will scale as if the ServerFarm was - /// ElasticPremium sku - /// Maximum number of total - /// workers allowed for this ElasticScaleEnabled App Service - /// Plan - /// Number of apps assigned to this App - /// Service plan. - /// If <code>true</code>, this App - /// Service Plan owns spot instances. - /// The time when the server farm - /// expires. Valid only if it is a spot server farm. - /// The time when the server farm - /// free offer expires. - /// Resource group of the App Service - /// plan. - /// If Linux app service plan - /// <code>true</code>, <code>false</code> - /// otherwise. - /// Obsolete: If Hyper-V container app service - /// plan <code>true</code>, <code>false</code> - /// otherwise. - /// If Hyper-V container app service plan - /// <code>true</code>, <code>false</code> - /// otherwise. - /// Scaling worker count. - /// Scaling worker size ID. - /// Provisioning state of the App - /// Service Plan. Possible values include: 'Succeeded', 'Failed', - /// 'Canceled', 'InProgress', 'Deleting' - /// Specification for the - /// Kubernetes Environment to use for the App Service plan. - /// If <code>true</code>, this - /// App Service Plan will perform availability zone balancing. - /// If <code>false</code>, this App Service Plan will not - /// perform availability zone balancing. - public AppServicePlan(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), bool? elasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile), bool? zoneRedundant = default(bool?), SkuDescription sku = default(SkuDescription), ExtendedLocation extendedLocation = default(ExtendedLocation)) - : base(location, id, name, kind, type, tags) - { - WorkerTierName = workerTierName; - Status = status; - Subscription = subscription; - HostingEnvironmentProfile = hostingEnvironmentProfile; - MaximumNumberOfWorkers = maximumNumberOfWorkers; - GeoRegion = geoRegion; - PerSiteScaling = perSiteScaling; - ElasticScaleEnabled = elasticScaleEnabled; - MaximumElasticWorkerCount = maximumElasticWorkerCount; - NumberOfSites = numberOfSites; - IsSpot = isSpot; - SpotExpirationTime = spotExpirationTime; - FreeOfferExpirationTime = freeOfferExpirationTime; - ResourceGroup = resourceGroup; - Reserved = reserved; - IsXenon = isXenon; - HyperV = hyperV; - TargetWorkerCount = targetWorkerCount; - TargetWorkerSizeId = targetWorkerSizeId; - ProvisioningState = provisioningState; - KubeEnvironmentProfile = kubeEnvironmentProfile; - ZoneRedundant = zoneRedundant; - Sku = sku; - ExtendedLocation = extendedLocation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets target worker tier assigned to the App Service plan. - /// - [JsonProperty(PropertyName = "properties.workerTierName")] - public string WorkerTierName { get; set; } - - /// - /// Gets app Service plan status. Possible values include: 'Ready', - /// 'Pending', 'Creating' - /// - [JsonProperty(PropertyName = "properties.status")] - public StatusOptions? Status { get; private set; } - - /// - /// Gets app Service plan subscription. - /// - [JsonProperty(PropertyName = "properties.subscription")] - public string Subscription { get; private set; } - - /// - /// Gets or sets specification for the App Service Environment to use - /// for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; set; } - - /// - /// Gets maximum number of instances that can be assigned to this App - /// Service plan. - /// - [JsonProperty(PropertyName = "properties.maximumNumberOfWorkers")] - public int? MaximumNumberOfWorkers { get; private set; } - - /// - /// Gets geographical location for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.geoRegion")] - public string GeoRegion { get; private set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, apps - /// assigned to this App Service plan can be scaled independently. - /// If &lt;code&gt;false&lt;/code&gt;, apps assigned to - /// this App Service plan will scale to all instances of the plan. - /// - [JsonProperty(PropertyName = "properties.perSiteScaling")] - public bool? PerSiteScaling { get; set; } - - /// - /// Gets or sets serverFarm supports ElasticScale. Apps in this plan - /// will scale as if the ServerFarm was ElasticPremium sku - /// - [JsonProperty(PropertyName = "properties.elasticScaleEnabled")] - public bool? ElasticScaleEnabled { get; set; } - - /// - /// Gets or sets maximum number of total workers allowed for this - /// ElasticScaleEnabled App Service Plan - /// - [JsonProperty(PropertyName = "properties.maximumElasticWorkerCount")] - public int? MaximumElasticWorkerCount { get; set; } - - /// - /// Gets number of apps assigned to this App Service plan. - /// - [JsonProperty(PropertyName = "properties.numberOfSites")] - public int? NumberOfSites { get; private set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this - /// App Service Plan owns spot instances. - /// - [JsonProperty(PropertyName = "properties.isSpot")] - public bool? IsSpot { get; set; } - - /// - /// Gets or sets the time when the server farm expires. Valid only if - /// it is a spot server farm. - /// - [JsonProperty(PropertyName = "properties.spotExpirationTime")] - public System.DateTime? SpotExpirationTime { get; set; } - - /// - /// Gets or sets the time when the server farm free offer expires. - /// - [JsonProperty(PropertyName = "properties.freeOfferExpirationTime")] - public System.DateTime? FreeOfferExpirationTime { get; set; } - - /// - /// Gets resource group of the App Service plan. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - - /// - /// Gets or sets if Linux app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.reserved")] - public bool? Reserved { get; set; } - - /// - /// Gets or sets obsolete: If Hyper-V container app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.isXenon")] - public bool? IsXenon { get; set; } - - /// - /// Gets or sets if Hyper-V container app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.hyperV")] - public bool? HyperV { get; set; } - - /// - /// Gets or sets scaling worker count. - /// - [JsonProperty(PropertyName = "properties.targetWorkerCount")] - public int? TargetWorkerCount { get; set; } - - /// - /// Gets or sets scaling worker size ID. - /// - [JsonProperty(PropertyName = "properties.targetWorkerSizeId")] - public int? TargetWorkerSizeId { get; set; } - - /// - /// Gets provisioning state of the App Service Plan. Possible values - /// include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets or sets specification for the Kubernetes Environment to use - /// for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] - public KubeEnvironmentProfile KubeEnvironmentProfile { get; set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this - /// App Service Plan will perform availability zone balancing. - /// If &lt;code&gt;false&lt;/code&gt;, this App Service - /// Plan will not perform availability zone balancing. - /// - [JsonProperty(PropertyName = "properties.zoneRedundant")] - public bool? ZoneRedundant { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sku")] - public SkuDescription Sku { get; set; } - - /// - /// - [JsonProperty(PropertyName = "extendedLocation")] - public ExtendedLocation ExtendedLocation { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs deleted file mode 100644 index c9c12ad353ac..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanPatchResource.cs +++ /dev/null @@ -1,280 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM resource for a app service plan. - /// - [Rest.Serialization.JsonTransformation] - public partial class AppServicePlanPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the AppServicePlanPatchResource - /// class. - /// - public AppServicePlanPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppServicePlanPatchResource - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Target worker tier assigned to the App - /// Service plan. - /// App Service plan status. Possible values - /// include: 'Ready', 'Pending', 'Creating' - /// App Service plan subscription. - /// Specification for the App - /// Service Environment to use for the App Service plan. - /// Maximum number of instances - /// that can be assigned to this App Service plan. - /// Geographical location for the App Service - /// plan. - /// If <code>true</code>, apps - /// assigned to this App Service plan can be scaled independently. - /// If <code>false</code>, apps assigned to this App - /// Service plan will scale to all instances of the plan. - /// ServerFarm supports ElasticScale. - /// Apps in this plan will scale as if the ServerFarm was - /// ElasticPremium sku - /// Maximum number of total - /// workers allowed for this ElasticScaleEnabled App Service - /// Plan - /// Number of apps assigned to this App - /// Service plan. - /// If <code>true</code>, this App - /// Service Plan owns spot instances. - /// The time when the server farm - /// expires. Valid only if it is a spot server farm. - /// The time when the server farm - /// free offer expires. - /// Resource group of the App Service - /// plan. - /// If Linux app service plan - /// <code>true</code>, <code>false</code> - /// otherwise. - /// Obsolete: If Hyper-V container app service - /// plan <code>true</code>, <code>false</code> - /// otherwise. - /// If Hyper-V container app service plan - /// <code>true</code>, <code>false</code> - /// otherwise. - /// Scaling worker count. - /// Scaling worker size ID. - /// Provisioning state of the App - /// Service Plan. Possible values include: 'Succeeded', 'Failed', - /// 'Canceled', 'InProgress', 'Deleting' - /// Specification for the - /// Kubernetes Environment to use for the App Service plan. - /// If <code>true</code>, this - /// App Service Plan will perform availability zone balancing. - /// If <code>false</code>, this App Service Plan will not - /// perform availability zone balancing. - public AppServicePlanPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string workerTierName = default(string), StatusOptions? status = default(StatusOptions?), string subscription = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), int? maximumNumberOfWorkers = default(int?), string geoRegion = default(string), bool? perSiteScaling = default(bool?), bool? elasticScaleEnabled = default(bool?), int? maximumElasticWorkerCount = default(int?), int? numberOfSites = default(int?), bool? isSpot = default(bool?), System.DateTime? spotExpirationTime = default(System.DateTime?), System.DateTime? freeOfferExpirationTime = default(System.DateTime?), string resourceGroup = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), int? targetWorkerCount = default(int?), int? targetWorkerSizeId = default(int?), ProvisioningState? provisioningState = default(ProvisioningState?), KubeEnvironmentProfile kubeEnvironmentProfile = default(KubeEnvironmentProfile), bool? zoneRedundant = default(bool?)) - : base(id, name, kind, type) - { - WorkerTierName = workerTierName; - Status = status; - Subscription = subscription; - HostingEnvironmentProfile = hostingEnvironmentProfile; - MaximumNumberOfWorkers = maximumNumberOfWorkers; - GeoRegion = geoRegion; - PerSiteScaling = perSiteScaling; - ElasticScaleEnabled = elasticScaleEnabled; - MaximumElasticWorkerCount = maximumElasticWorkerCount; - NumberOfSites = numberOfSites; - IsSpot = isSpot; - SpotExpirationTime = spotExpirationTime; - FreeOfferExpirationTime = freeOfferExpirationTime; - ResourceGroup = resourceGroup; - Reserved = reserved; - IsXenon = isXenon; - HyperV = hyperV; - TargetWorkerCount = targetWorkerCount; - TargetWorkerSizeId = targetWorkerSizeId; - ProvisioningState = provisioningState; - KubeEnvironmentProfile = kubeEnvironmentProfile; - ZoneRedundant = zoneRedundant; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets target worker tier assigned to the App Service plan. - /// - [JsonProperty(PropertyName = "properties.workerTierName")] - public string WorkerTierName { get; set; } - - /// - /// Gets app Service plan status. Possible values include: 'Ready', - /// 'Pending', 'Creating' - /// - [JsonProperty(PropertyName = "properties.status")] - public StatusOptions? Status { get; private set; } - - /// - /// Gets app Service plan subscription. - /// - [JsonProperty(PropertyName = "properties.subscription")] - public string Subscription { get; private set; } - - /// - /// Gets or sets specification for the App Service Environment to use - /// for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; set; } - - /// - /// Gets maximum number of instances that can be assigned to this App - /// Service plan. - /// - [JsonProperty(PropertyName = "properties.maximumNumberOfWorkers")] - public int? MaximumNumberOfWorkers { get; private set; } - - /// - /// Gets geographical location for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.geoRegion")] - public string GeoRegion { get; private set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, apps - /// assigned to this App Service plan can be scaled independently. - /// If &lt;code&gt;false&lt;/code&gt;, apps assigned to - /// this App Service plan will scale to all instances of the plan. - /// - [JsonProperty(PropertyName = "properties.perSiteScaling")] - public bool? PerSiteScaling { get; set; } - - /// - /// Gets or sets serverFarm supports ElasticScale. Apps in this plan - /// will scale as if the ServerFarm was ElasticPremium sku - /// - [JsonProperty(PropertyName = "properties.elasticScaleEnabled")] - public bool? ElasticScaleEnabled { get; set; } - - /// - /// Gets or sets maximum number of total workers allowed for this - /// ElasticScaleEnabled App Service Plan - /// - [JsonProperty(PropertyName = "properties.maximumElasticWorkerCount")] - public int? MaximumElasticWorkerCount { get; set; } - - /// - /// Gets number of apps assigned to this App Service plan. - /// - [JsonProperty(PropertyName = "properties.numberOfSites")] - public int? NumberOfSites { get; private set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this - /// App Service Plan owns spot instances. - /// - [JsonProperty(PropertyName = "properties.isSpot")] - public bool? IsSpot { get; set; } - - /// - /// Gets or sets the time when the server farm expires. Valid only if - /// it is a spot server farm. - /// - [JsonProperty(PropertyName = "properties.spotExpirationTime")] - public System.DateTime? SpotExpirationTime { get; set; } - - /// - /// Gets or sets the time when the server farm free offer expires. - /// - [JsonProperty(PropertyName = "properties.freeOfferExpirationTime")] - public System.DateTime? FreeOfferExpirationTime { get; set; } - - /// - /// Gets resource group of the App Service plan. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - - /// - /// Gets or sets if Linux app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.reserved")] - public bool? Reserved { get; set; } - - /// - /// Gets or sets obsolete: If Hyper-V container app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.isXenon")] - public bool? IsXenon { get; set; } - - /// - /// Gets or sets if Hyper-V container app service plan - /// &lt;code&gt;true&lt;/code&gt;, - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.hyperV")] - public bool? HyperV { get; set; } - - /// - /// Gets or sets scaling worker count. - /// - [JsonProperty(PropertyName = "properties.targetWorkerCount")] - public int? TargetWorkerCount { get; set; } - - /// - /// Gets or sets scaling worker size ID. - /// - [JsonProperty(PropertyName = "properties.targetWorkerSizeId")] - public int? TargetWorkerSizeId { get; set; } - - /// - /// Gets provisioning state of the App Service Plan. Possible values - /// include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets or sets specification for the Kubernetes Environment to use - /// for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.kubeEnvironmentProfile")] - public KubeEnvironmentProfile KubeEnvironmentProfile { get; set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, this - /// App Service Plan will perform availability zone balancing. - /// If &lt;code&gt;false&lt;/code&gt;, this App Service - /// Plan will not perform availability zone balancing. - /// - [JsonProperty(PropertyName = "properties.zoneRedundant")] - public bool? ZoneRedundant { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanRestrictions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanRestrictions.cs deleted file mode 100644 index e27c1a65a91a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppServicePlanRestrictions.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AppServicePlanRestrictions. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AppServicePlanRestrictions - { - [EnumMember(Value = "None")] - None, - [EnumMember(Value = "Free")] - Free, - [EnumMember(Value = "Shared")] - Shared, - [EnumMember(Value = "Basic")] - Basic, - [EnumMember(Value = "Standard")] - Standard, - [EnumMember(Value = "Premium")] - Premium - } - internal static class AppServicePlanRestrictionsEnumExtension - { - internal static string ToSerializedValue(this AppServicePlanRestrictions? value) - { - return value == null ? null : ((AppServicePlanRestrictions)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AppServicePlanRestrictions value) - { - switch( value ) - { - case AppServicePlanRestrictions.None: - return "None"; - case AppServicePlanRestrictions.Free: - return "Free"; - case AppServicePlanRestrictions.Shared: - return "Shared"; - case AppServicePlanRestrictions.Basic: - return "Basic"; - case AppServicePlanRestrictions.Standard: - return "Standard"; - case AppServicePlanRestrictions.Premium: - return "Premium"; - } - return null; - } - - internal static AppServicePlanRestrictions? ParseAppServicePlanRestrictions(this string value) - { - switch( value ) - { - case "None": - return AppServicePlanRestrictions.None; - case "Free": - return AppServicePlanRestrictions.Free; - case "Shared": - return AppServicePlanRestrictions.Shared; - case "Basic": - return AppServicePlanRestrictions.Basic; - case "Standard": - return AppServicePlanRestrictions.Standard; - case "Premium": - return AppServicePlanRestrictions.Premium; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs deleted file mode 100644 index 43a78bbe7c7b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Apple.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Apple provider. - /// - public partial class Apple - { - /// - /// Initializes a new instance of the Apple class. - /// - public Apple() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Apple class. - /// - /// <code>false</code> if the Apple - /// provider should not be enabled despite the set registration; - /// otherwise, <code>true</code>. - /// The configuration settings of the Apple - /// registration. - /// The configuration settings of the login - /// flow. - public Apple(bool? enabled = default(bool?), AppleRegistration registration = default(AppleRegistration), LoginScopes login = default(LoginScopes)) - { - Enabled = enabled; - Registration = registration; - Login = login; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Apple provider should not be enabled despite the set registration; - /// otherwise, &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the Apple registration. - /// - [JsonProperty(PropertyName = "registration")] - public AppleRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow. - /// - [JsonProperty(PropertyName = "login")] - public LoginScopes Login { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs deleted file mode 100644 index 146ad5b1d8df..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppleRegistration.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the registration for the Apple provider - /// - public partial class AppleRegistration - { - /// - /// Initializes a new instance of the AppleRegistration class. - /// - public AppleRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppleRegistration class. - /// - /// The Client ID of the app used for - /// login. - /// The app setting name that - /// contains the client secret. - public AppleRegistration(string clientId = default(string), string clientSecretSettingName = default(string)) - { - ClientId = clientId; - ClientSecretSettingName = clientSecretSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Client ID of the app used for login. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret. - /// - [JsonProperty(PropertyName = "clientSecretSettingName")] - public string ClientSecretSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationLogsConfig.cs deleted file mode 100644 index 49d7982d2b0b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationLogsConfig.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Application logs configuration. - /// - public partial class ApplicationLogsConfig - { - /// - /// Initializes a new instance of the ApplicationLogsConfig class. - /// - public ApplicationLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApplicationLogsConfig class. - /// - /// Application logs to file system - /// configuration. - /// Application logs to azure table - /// storage configuration. - /// Application logs to blob storage - /// configuration. - public ApplicationLogsConfig(FileSystemApplicationLogsConfig fileSystem = default(FileSystemApplicationLogsConfig), AzureTableStorageApplicationLogsConfig azureTableStorage = default(AzureTableStorageApplicationLogsConfig), AzureBlobStorageApplicationLogsConfig azureBlobStorage = default(AzureBlobStorageApplicationLogsConfig)) - { - FileSystem = fileSystem; - AzureTableStorage = azureTableStorage; - AzureBlobStorage = azureBlobStorage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application logs to file system configuration. - /// - [JsonProperty(PropertyName = "fileSystem")] - public FileSystemApplicationLogsConfig FileSystem { get; set; } - - /// - /// Gets or sets application logs to azure table storage configuration. - /// - [JsonProperty(PropertyName = "azureTableStorage")] - public AzureTableStorageApplicationLogsConfig AzureTableStorage { get; set; } - - /// - /// Gets or sets application logs to blob storage configuration. - /// - [JsonProperty(PropertyName = "azureBlobStorage")] - public AzureBlobStorageApplicationLogsConfig AzureBlobStorage { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AzureTableStorage != null) - { - AzureTableStorage.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs deleted file mode 100644 index 581290a604fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStack.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Application stack. - /// - public partial class ApplicationStack - { - /// - /// Initializes a new instance of the ApplicationStack class. - /// - public ApplicationStack() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApplicationStack class. - /// - /// Application stack name. - /// Application stack display name. - /// Application stack dependency. - /// List of major versions - /// available. - /// List of frameworks associated with - /// application stack. - /// <code>true</code> if this is - /// the stack is deprecated; otherwise, - /// <code>false</code>. - public ApplicationStack(string name = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList), IList isDeprecated = default(IList)) - { - Name = name; - Display = display; - Dependency = dependency; - MajorVersions = majorVersions; - Frameworks = frameworks; - IsDeprecated = isDeprecated; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application stack name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets application stack display name. - /// - [JsonProperty(PropertyName = "display")] - public string Display { get; set; } - - /// - /// Gets or sets application stack dependency. - /// - [JsonProperty(PropertyName = "dependency")] - public string Dependency { get; set; } - - /// - /// Gets or sets list of major versions available. - /// - [JsonProperty(PropertyName = "majorVersions")] - public IList MajorVersions { get; set; } - - /// - /// Gets or sets list of frameworks associated with application stack. - /// - [JsonProperty(PropertyName = "frameworks")] - public IList Frameworks { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// is the stack is deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public IList IsDeprecated { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs deleted file mode 100644 index ace998a07c8a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ApplicationStackResource.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a ApplicationStack. - /// - [Rest.Serialization.JsonTransformation] - public partial class ApplicationStackResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ApplicationStackResource class. - /// - public ApplicationStackResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ApplicationStackResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Application stack - /// name. - /// Application stack display name. - /// Application stack dependency. - /// List of major versions - /// available. - /// List of frameworks associated with - /// application stack. - /// <code>true</code> if this is - /// the stack is deprecated; otherwise, - /// <code>false</code>. - public ApplicationStackResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string applicationStackResourceName = default(string), string display = default(string), string dependency = default(string), IList majorVersions = default(IList), IList frameworks = default(IList), IList isDeprecated = default(IList)) - : base(id, name, kind, type) - { - ApplicationStackResourceName = applicationStackResourceName; - Display = display; - Dependency = dependency; - MajorVersions = majorVersions; - Frameworks = frameworks; - IsDeprecated = isDeprecated; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application stack name. - /// - [JsonProperty(PropertyName = "properties.name")] - public string ApplicationStackResourceName { get; set; } - - /// - /// Gets or sets application stack display name. - /// - [JsonProperty(PropertyName = "properties.display")] - public string Display { get; set; } - - /// - /// Gets or sets application stack dependency. - /// - [JsonProperty(PropertyName = "properties.dependency")] - public string Dependency { get; set; } - - /// - /// Gets or sets list of major versions available. - /// - [JsonProperty(PropertyName = "properties.majorVersions")] - public IList MajorVersions { get; set; } - - /// - /// Gets or sets list of frameworks associated with application stack. - /// - [JsonProperty(PropertyName = "properties.frameworks")] - public IList Frameworks { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// is the stack is deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isDeprecated")] - public IList IsDeprecated { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs deleted file mode 100644 index a4a1226ce6af..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubToken.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Github access token for Appservice CLI github integration. - /// - public partial class AppserviceGithubToken - { - /// - /// Initializes a new instance of the AppserviceGithubToken class. - /// - public AppserviceGithubToken() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppserviceGithubToken class. - /// - /// Github access token for Appservice CLI - /// github integration - /// Scope of the github access token - /// token type - /// True if valid github token received, False - /// otherwise - /// Error message if unable to get - /// token - public AppserviceGithubToken(string accessToken = default(string), string scope = default(string), string tokenType = default(string), bool? gotToken = default(bool?), string errorMessage = default(string)) - { - AccessToken = accessToken; - Scope = scope; - TokenType = tokenType; - GotToken = gotToken; - ErrorMessage = errorMessage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets github access token for Appservice CLI github - /// integration - /// - [JsonProperty(PropertyName = "accessToken")] - public string AccessToken { get; set; } - - /// - /// Gets or sets scope of the github access token - /// - [JsonProperty(PropertyName = "scope")] - public string Scope { get; set; } - - /// - /// Gets or sets token type - /// - [JsonProperty(PropertyName = "tokenType")] - public string TokenType { get; set; } - - /// - /// Gets or sets true if valid github token received, False otherwise - /// - [JsonProperty(PropertyName = "gotToken")] - public bool? GotToken { get; set; } - - /// - /// Gets or sets error message if unable to get token - /// - [JsonProperty(PropertyName = "errorMessage")] - public string ErrorMessage { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs deleted file mode 100644 index e99bcc39cb0f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AppserviceGithubTokenRequest.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Appservice Github token request content. - /// - public partial class AppserviceGithubTokenRequest - { - /// - /// Initializes a new instance of the AppserviceGithubTokenRequest - /// class. - /// - public AppserviceGithubTokenRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AppserviceGithubTokenRequest - /// class. - /// - /// Code string to exchange for Github Access - /// token - /// State string used for verification. - public AppserviceGithubTokenRequest(string code, string state) - { - Code = code; - State = state; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets code string to exchange for Github Access token - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets or sets state string used for verification. - /// - [JsonProperty(PropertyName = "state")] - public string State { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Code == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Code"); - } - if (State == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "State"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs deleted file mode 100644 index 8fa89baad2b2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArcConfiguration.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ArcConfiguration - { - /// - /// Initializes a new instance of the ArcConfiguration class. - /// - public ArcConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ArcConfiguration class. - /// - /// Possible values include: - /// 'LocalNode', 'NetworkFileSystem' - public ArcConfiguration(StorageType? artifactsStorageType = default(StorageType?), string artifactStorageClassName = default(string), string artifactStorageMountPath = default(string), string artifactStorageNodeName = default(string), string artifactStorageAccessMode = default(string), FrontEndConfiguration frontEndServiceConfiguration = default(FrontEndConfiguration), string kubeConfig = default(string)) - { - ArtifactsStorageType = artifactsStorageType; - ArtifactStorageClassName = artifactStorageClassName; - ArtifactStorageMountPath = artifactStorageMountPath; - ArtifactStorageNodeName = artifactStorageNodeName; - ArtifactStorageAccessMode = artifactStorageAccessMode; - FrontEndServiceConfiguration = frontEndServiceConfiguration; - KubeConfig = kubeConfig; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets possible values include: 'LocalNode', - /// 'NetworkFileSystem' - /// - [JsonProperty(PropertyName = "artifactsStorageType")] - public StorageType? ArtifactsStorageType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "artifactStorageClassName")] - public string ArtifactStorageClassName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "artifactStorageMountPath")] - public string ArtifactStorageMountPath { get; set; } - - /// - /// - [JsonProperty(PropertyName = "artifactStorageNodeName")] - public string ArtifactStorageNodeName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "artifactStorageAccessMode")] - public string ArtifactStorageAccessMode { get; set; } - - /// - /// - [JsonProperty(PropertyName = "frontEndServiceConfiguration")] - public FrontEndConfiguration FrontEndServiceConfiguration { get; set; } - - /// - /// - [JsonProperty(PropertyName = "kubeConfig")] - public string KubeConfig { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmIdWrapper.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmIdWrapper.cs deleted file mode 100644 index 29086012629d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmIdWrapper.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// A wrapper for an ARM resource id - /// - public partial class ArmIdWrapper - { - /// - /// Initializes a new instance of the ArmIdWrapper class. - /// - public ArmIdWrapper() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ArmIdWrapper class. - /// - public ArmIdWrapper(string id = default(string)) - { - Id = id; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs deleted file mode 100644 index fc74b705a4e6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ArmPlan.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The plan object in Azure Resource Manager, represents a marketplace - /// plan. - /// - public partial class ArmPlan - { - /// - /// Initializes a new instance of the ArmPlan class. - /// - public ArmPlan() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ArmPlan class. - /// - /// The name. - /// The publisher. - /// The product. - /// The promotion code. - /// Version of product. - public ArmPlan(string name = default(string), string publisher = default(string), string product = default(string), string promotionCode = default(string), string version = default(string)) - { - Name = name; - Publisher = publisher; - Product = product; - PromotionCode = promotionCode; - Version = version; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the publisher. - /// - [JsonProperty(PropertyName = "publisher")] - public string Publisher { get; set; } - - /// - /// Gets or sets the product. - /// - [JsonProperty(PropertyName = "product")] - public string Product { get; set; } - - /// - /// Gets or sets the promotion code. - /// - [JsonProperty(PropertyName = "promotionCode")] - public string PromotionCode { get; set; } - - /// - /// Gets or sets version of product. - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs deleted file mode 100644 index 2e0798e1f3bf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AseV3NetworkingConfiguration.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Full view of networking configuration for an ASE. - /// - [Rest.Serialization.JsonTransformation] - public partial class AseV3NetworkingConfiguration : ProxyOnlyResource - { - /// - /// Initializes a new instance of the AseV3NetworkingConfiguration - /// class. - /// - public AseV3NetworkingConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AseV3NetworkingConfiguration - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Property to enable - /// and disable new private endpoint connection creation on ASE - public AseV3NetworkingConfiguration(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList windowsOutboundIpAddresses = default(IList), IList linuxOutboundIpAddresses = default(IList), IList externalInboundIpAddresses = default(IList), IList internalInboundIpAddresses = default(IList), bool? allowNewPrivateEndpointConnections = default(bool?)) - : base(id, name, kind, type) - { - WindowsOutboundIpAddresses = windowsOutboundIpAddresses; - LinuxOutboundIpAddresses = linuxOutboundIpAddresses; - ExternalInboundIpAddresses = externalInboundIpAddresses; - InternalInboundIpAddresses = internalInboundIpAddresses; - AllowNewPrivateEndpointConnections = allowNewPrivateEndpointConnections; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.windowsOutboundIpAddresses")] - public IList WindowsOutboundIpAddresses { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "properties.linuxOutboundIpAddresses")] - public IList LinuxOutboundIpAddresses { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "properties.externalInboundIpAddresses")] - public IList ExternalInboundIpAddresses { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "properties.internalInboundIpAddresses")] - public IList InternalInboundIpAddresses { get; private set; } - - /// - /// Gets or sets property to enable and disable new private endpoint - /// connection creation on ASE - /// - [JsonProperty(PropertyName = "properties.allowNewPrivateEndpointConnections")] - public bool? AllowNewPrivateEndpointConnections { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs deleted file mode 100644 index 1a0baed9b5ce..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AuthPlatform.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the platform of App Service - /// Authentication/Authorization. - /// - public partial class AuthPlatform - { - /// - /// Initializes a new instance of the AuthPlatform class. - /// - public AuthPlatform() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AuthPlatform class. - /// - /// <code>true</code> if the - /// Authentication / Authorization feature is enabled for the current - /// app; otherwise, <code>false</code>. - /// The RuntimeVersion of the - /// Authentication / Authorization feature in use for the current app. - /// The setting in this value can control the behavior of certain - /// features in the Authentication / Authorization module. - /// The path of the config file containing - /// auth settings if they come from a file. - /// If the path is relative, base will the site's root - /// directory. - public AuthPlatform(bool? enabled = default(bool?), string runtimeVersion = default(string), string configFilePath = default(string)) - { - Enabled = enabled; - RuntimeVersion = runtimeVersion; - ConfigFilePath = configFilePath; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// Authentication / Authorization feature is enabled for the current - /// app; otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the RuntimeVersion of the Authentication / - /// Authorization feature in use for the current app. - /// The setting in this value can control the behavior of certain - /// features in the Authentication / Authorization module. - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; set; } - - /// - /// Gets or sets the path of the config file containing auth settings - /// if they come from a file. - /// If the path is relative, base will the site's root directory. - /// - [JsonProperty(PropertyName = "configFilePath")] - public string ConfigFilePath { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActionType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActionType.cs deleted file mode 100644 index 60d28758200e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActionType.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AutoHealActionType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AutoHealActionType - { - [EnumMember(Value = "Recycle")] - Recycle, - [EnumMember(Value = "LogEvent")] - LogEvent, - [EnumMember(Value = "CustomAction")] - CustomAction - } - internal static class AutoHealActionTypeEnumExtension - { - internal static string ToSerializedValue(this AutoHealActionType? value) - { - return value == null ? null : ((AutoHealActionType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AutoHealActionType value) - { - switch( value ) - { - case AutoHealActionType.Recycle: - return "Recycle"; - case AutoHealActionType.LogEvent: - return "LogEvent"; - case AutoHealActionType.CustomAction: - return "CustomAction"; - } - return null; - } - - internal static AutoHealActionType? ParseAutoHealActionType(this string value) - { - switch( value ) - { - case "Recycle": - return AutoHealActionType.Recycle; - case "LogEvent": - return AutoHealActionType.LogEvent; - case "CustomAction": - return AutoHealActionType.CustomAction; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActions.cs deleted file mode 100644 index 14b9448320b6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealActions.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Actions which to take by the auto-heal module when a rule is triggered. - /// - public partial class AutoHealActions - { - /// - /// Initializes a new instance of the AutoHealActions class. - /// - public AutoHealActions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AutoHealActions class. - /// - /// Predefined action to be taken. Possible - /// values include: 'Recycle', 'LogEvent', 'CustomAction' - /// Custom action to be taken. - /// Minimum time the process must - /// execute - /// before taking the action - public AutoHealActions(AutoHealActionType? actionType = default(AutoHealActionType?), AutoHealCustomAction customAction = default(AutoHealCustomAction), string minProcessExecutionTime = default(string)) - { - ActionType = actionType; - CustomAction = customAction; - MinProcessExecutionTime = minProcessExecutionTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets predefined action to be taken. Possible values - /// include: 'Recycle', 'LogEvent', 'CustomAction' - /// - [JsonProperty(PropertyName = "actionType")] - public AutoHealActionType? ActionType { get; set; } - - /// - /// Gets or sets custom action to be taken. - /// - [JsonProperty(PropertyName = "customAction")] - public AutoHealCustomAction CustomAction { get; set; } - - /// - /// Gets or sets minimum time the process must execute - /// before taking the action - /// - [JsonProperty(PropertyName = "minProcessExecutionTime")] - public string MinProcessExecutionTime { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealCustomAction.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealCustomAction.cs deleted file mode 100644 index d21dbb6d57f3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealCustomAction.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Custom action to be executed - /// when an auto heal rule is triggered. - /// - public partial class AutoHealCustomAction - { - /// - /// Initializes a new instance of the AutoHealCustomAction class. - /// - public AutoHealCustomAction() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AutoHealCustomAction class. - /// - /// Executable to be run. - /// Parameters for the executable. - public AutoHealCustomAction(string exe = default(string), string parameters = default(string)) - { - Exe = exe; - Parameters = parameters; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets executable to be run. - /// - [JsonProperty(PropertyName = "exe")] - public string Exe { get; set; } - - /// - /// Gets or sets parameters for the executable. - /// - [JsonProperty(PropertyName = "parameters")] - public string Parameters { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealRules.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealRules.cs deleted file mode 100644 index 73309239d4f8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealRules.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Rules that can be defined for auto-heal. - /// - public partial class AutoHealRules - { - /// - /// Initializes a new instance of the AutoHealRules class. - /// - public AutoHealRules() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AutoHealRules class. - /// - /// Conditions that describe when to execute the - /// auto-heal actions. - /// Actions to be executed when a rule is - /// triggered. - public AutoHealRules(AutoHealTriggers triggers = default(AutoHealTriggers), AutoHealActions actions = default(AutoHealActions)) - { - Triggers = triggers; - Actions = actions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets conditions that describe when to execute the auto-heal - /// actions. - /// - [JsonProperty(PropertyName = "triggers")] - public AutoHealTriggers Triggers { get; set; } - - /// - /// Gets or sets actions to be executed when a rule is triggered. - /// - [JsonProperty(PropertyName = "actions")] - public AutoHealActions Actions { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs deleted file mode 100644 index 9d375020a49e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AutoHealTriggers.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Triggers for auto-heal. - /// - public partial class AutoHealTriggers - { - /// - /// Initializes a new instance of the AutoHealTriggers class. - /// - public AutoHealTriggers() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AutoHealTriggers class. - /// - /// A rule based on total requests. - /// A rule based on private - /// bytes. - /// A rule based on status codes. - /// A rule based on request execution - /// time. - /// A rule based on multiple Slow - /// Requests Rule with path - /// A rule based on status codes - /// ranges. - public AutoHealTriggers(RequestsBasedTrigger requests = default(RequestsBasedTrigger), int? privateBytesInKB = default(int?), IList statusCodes = default(IList), SlowRequestsBasedTrigger slowRequests = default(SlowRequestsBasedTrigger), IList slowRequestsWithPath = default(IList), IList statusCodesRange = default(IList)) - { - Requests = requests; - PrivateBytesInKB = privateBytesInKB; - StatusCodes = statusCodes; - SlowRequests = slowRequests; - SlowRequestsWithPath = slowRequestsWithPath; - StatusCodesRange = statusCodesRange; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a rule based on total requests. - /// - [JsonProperty(PropertyName = "requests")] - public RequestsBasedTrigger Requests { get; set; } - - /// - /// Gets or sets a rule based on private bytes. - /// - [JsonProperty(PropertyName = "privateBytesInKB")] - public int? PrivateBytesInKB { get; set; } - - /// - /// Gets or sets a rule based on status codes. - /// - [JsonProperty(PropertyName = "statusCodes")] - public IList StatusCodes { get; set; } - - /// - /// Gets or sets a rule based on request execution time. - /// - [JsonProperty(PropertyName = "slowRequests")] - public SlowRequestsBasedTrigger SlowRequests { get; set; } - - /// - /// Gets or sets a rule based on multiple Slow Requests Rule with path - /// - [JsonProperty(PropertyName = "slowRequestsWithPath")] - public IList SlowRequestsWithPath { get; set; } - - /// - /// Gets or sets a rule based on status codes ranges. - /// - [JsonProperty(PropertyName = "statusCodesRange")] - public IList StatusCodesRange { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs deleted file mode 100644 index 657115f7de5e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectory.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Azure Active directory provider. - /// - public partial class AzureActiveDirectory - { - /// - /// Initializes a new instance of the AzureActiveDirectory class. - /// - public AzureActiveDirectory() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureActiveDirectory class. - /// - /// <code>false</code> if the Azure - /// Active Directory provider should not be enabled despite the set - /// registration; otherwise, <code>true</code>. - /// The configuration settings of the Azure - /// Active Directory app registration. - /// The configuration settings of the Azure Active - /// Directory login flow. - /// The configuration settings of the Azure - /// Active Directory token validation flow. - /// Gets a value indicating whether the - /// Azure AD configuration was auto-provisioned using 1st party - /// tooling. - /// This is an internal flag primarily intended to support the Azure - /// Management Portal. Users should not - /// read or write to this property. - public AzureActiveDirectory(bool? enabled = default(bool?), AzureActiveDirectoryRegistration registration = default(AzureActiveDirectoryRegistration), AzureActiveDirectoryLogin login = default(AzureActiveDirectoryLogin), AzureActiveDirectoryValidation validation = default(AzureActiveDirectoryValidation), bool? isAutoProvisioned = default(bool?)) - { - Enabled = enabled; - Registration = registration; - Login = login; - Validation = validation; - IsAutoProvisioned = isAutoProvisioned; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Azure Active Directory provider should not be enabled despite the - /// set registration; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory app registration. - /// - [JsonProperty(PropertyName = "registration")] - public AzureActiveDirectoryRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory login flow. - /// - [JsonProperty(PropertyName = "login")] - public AzureActiveDirectoryLogin Login { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory token validation flow. - /// - [JsonProperty(PropertyName = "validation")] - public AzureActiveDirectoryValidation Validation { get; set; } - - /// - /// Gets a value indicating whether the Azure AD configuration was - /// auto-provisioned using 1st party tooling. - /// This is an internal flag primarily intended to support the Azure - /// Management Portal. Users should not - /// read or write to this property. - /// - [JsonProperty(PropertyName = "isAutoProvisioned")] - public bool? IsAutoProvisioned { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs deleted file mode 100644 index 8486ec2916c9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryLogin.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the Azure Active Directory login flow. - /// - public partial class AzureActiveDirectoryLogin - { - /// - /// Initializes a new instance of the AzureActiveDirectoryLogin class. - /// - public AzureActiveDirectoryLogin() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureActiveDirectoryLogin class. - /// - /// Login parameters to send to the - /// OpenID Connect authorization endpoint when - /// a user logs in. Each parameter must be in the form - /// "key=value". - /// <code>true</code> - /// if the www-authenticate provider should be omitted from the - /// request; otherwise, <code>false</code>. - public AzureActiveDirectoryLogin(IList loginParameters = default(IList), bool? disableWWWAuthenticate = default(bool?)) - { - LoginParameters = loginParameters; - DisableWWWAuthenticate = disableWWWAuthenticate; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets login parameters to send to the OpenID Connect - /// authorization endpoint when - /// a user logs in. Each parameter must be in the form "key=value". - /// - [JsonProperty(PropertyName = "loginParameters")] - public IList LoginParameters { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// www-authenticate provider should be omitted from the request; - /// otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "disableWWWAuthenticate")] - public bool? DisableWWWAuthenticate { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs deleted file mode 100644 index b6acd7515839..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryRegistration.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Azure Active Directory app - /// registration. - /// - public partial class AzureActiveDirectoryRegistration - { - /// - /// Initializes a new instance of the AzureActiveDirectoryRegistration - /// class. - /// - public AzureActiveDirectoryRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureActiveDirectoryRegistration - /// class. - /// - /// The OpenID Connect Issuer URI that - /// represents the entity which issues access tokens for this - /// application. - /// When using Azure Active Directory, this value is the URI of the - /// directory tenant, e.g. - /// https://login.microsoftonline.com/v2.0/{tenant-guid}/. - /// This URI is a case-sensitive identifier for the token issuer. - /// More information on OpenID Connect Discovery: - /// http://openid.net/specs/openid-connect-discovery-1_0.html - /// The Client ID of this relying party - /// application, known as the client_id. - /// This setting is required for enabling OpenID Connection - /// authentication with Azure Active Directory or - /// other 3rd party OpenID Connect providers. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// The app setting name that - /// contains the client secret of the relying party - /// application. - /// An alternative to - /// the client secret, that is the thumbprint of a certificate used for - /// signing purposes. This property acts as - /// a replacement for the Client Secret. It is also optional. - /// An - /// alternative to the client secret thumbprint, that is the subject - /// alternative name of a certificate used for signing purposes. This - /// property acts as - /// a replacement for the Client Secret Certificate Thumbprint. It is - /// also optional. - /// An alternative to the - /// client secret thumbprint, that is the issuer of a certificate used - /// for signing purposes. This property acts as - /// a replacement for the Client Secret Certificate Thumbprint. It is - /// also optional. - public AzureActiveDirectoryRegistration(string openIdIssuer = default(string), string clientId = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string), string clientSecretCertificateSubjectAlternativeName = default(string), string clientSecretCertificateIssuer = default(string)) - { - OpenIdIssuer = openIdIssuer; - ClientId = clientId; - ClientSecretSettingName = clientSecretSettingName; - ClientSecretCertificateThumbprint = clientSecretCertificateThumbprint; - ClientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; - ClientSecretCertificateIssuer = clientSecretCertificateIssuer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the OpenID Connect Issuer URI that represents the - /// entity which issues access tokens for this application. - /// When using Azure Active Directory, this value is the URI of the - /// directory tenant, e.g. - /// https://login.microsoftonline.com/v2.0/{tenant-guid}/. - /// This URI is a case-sensitive identifier for the token issuer. - /// More information on OpenID Connect Discovery: - /// http://openid.net/specs/openid-connect-discovery-1_0.html - /// - [JsonProperty(PropertyName = "openIdIssuer")] - public string OpenIdIssuer { get; set; } - - /// - /// Gets or sets the Client ID of this relying party application, known - /// as the client_id. - /// This setting is required for enabling OpenID Connection - /// authentication with Azure Active Directory or - /// other 3rd party OpenID Connect providers. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret - /// of the relying party application. - /// - [JsonProperty(PropertyName = "clientSecretSettingName")] - public string ClientSecretSettingName { get; set; } - - /// - /// Gets or sets an alternative to the client secret, that is the - /// thumbprint of a certificate used for signing purposes. This - /// property acts as - /// a replacement for the Client Secret. It is also optional. - /// - [JsonProperty(PropertyName = "clientSecretCertificateThumbprint")] - public string ClientSecretCertificateThumbprint { get; set; } - - /// - /// Gets or sets an alternative to the client secret thumbprint, that - /// is the subject alternative name of a certificate used for signing - /// purposes. This property acts as - /// a replacement for the Client Secret Certificate Thumbprint. It is - /// also optional. - /// - [JsonProperty(PropertyName = "clientSecretCertificateSubjectAlternativeName")] - public string ClientSecretCertificateSubjectAlternativeName { get; set; } - - /// - /// Gets or sets an alternative to the client secret thumbprint, that - /// is the issuer of a certificate used for signing purposes. This - /// property acts as - /// a replacement for the Client Secret Certificate Thumbprint. It is - /// also optional. - /// - [JsonProperty(PropertyName = "clientSecretCertificateIssuer")] - public string ClientSecretCertificateIssuer { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs deleted file mode 100644 index 5cb5944d7f1a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureActiveDirectoryValidation.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the Azure Active Directory token - /// validation flow. - /// - public partial class AzureActiveDirectoryValidation - { - /// - /// Initializes a new instance of the AzureActiveDirectoryValidation - /// class. - /// - public AzureActiveDirectoryValidation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureActiveDirectoryValidation - /// class. - /// - /// The configuration settings of the - /// checks that should be made while validating the JWT Claims. - /// The list of audiences that can make - /// successful authentication/authorization requests. - /// The configuration settings - /// of the default authorization policy. - public AzureActiveDirectoryValidation(JwtClaimChecks jwtClaimChecks = default(JwtClaimChecks), IList allowedAudiences = default(IList), DefaultAuthorizationPolicy defaultAuthorizationPolicy = default(DefaultAuthorizationPolicy)) - { - JwtClaimChecks = jwtClaimChecks; - AllowedAudiences = allowedAudiences; - DefaultAuthorizationPolicy = defaultAuthorizationPolicy; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the configuration settings of the checks that should - /// be made while validating the JWT Claims. - /// - [JsonProperty(PropertyName = "jwtClaimChecks")] - public JwtClaimChecks JwtClaimChecks { get; set; } - - /// - /// Gets or sets the list of audiences that can make successful - /// authentication/authorization requests. - /// - [JsonProperty(PropertyName = "allowedAudiences")] - public IList AllowedAudiences { get; set; } - - /// - /// Gets or sets the configuration settings of the default - /// authorization policy. - /// - [JsonProperty(PropertyName = "defaultAuthorizationPolicy")] - public DefaultAuthorizationPolicy DefaultAuthorizationPolicy { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageApplicationLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageApplicationLogsConfig.cs deleted file mode 100644 index dbfaddf80d36..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageApplicationLogsConfig.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Application logs azure blob storage configuration. - /// - public partial class AzureBlobStorageApplicationLogsConfig - { - /// - /// Initializes a new instance of the - /// AzureBlobStorageApplicationLogsConfig class. - /// - public AzureBlobStorageApplicationLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AzureBlobStorageApplicationLogsConfig class. - /// - /// Log level. Possible values include: 'Off', - /// 'Verbose', 'Information', 'Warning', 'Error' - /// SAS url to a azure blob container with - /// read/write/list/delete permissions. - /// Retention in days. - /// Remove blobs older than X days. - /// 0 or lower means no retention. - public AzureBlobStorageApplicationLogsConfig(LogLevel? level = default(LogLevel?), string sasUrl = default(string), int? retentionInDays = default(int?)) - { - Level = level; - SasUrl = sasUrl; - RetentionInDays = retentionInDays; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets log level. Possible values include: 'Off', 'Verbose', - /// 'Information', 'Warning', 'Error' - /// - [JsonProperty(PropertyName = "level")] - public LogLevel? Level { get; set; } - - /// - /// Gets or sets SAS url to a azure blob container with - /// read/write/list/delete permissions. - /// - [JsonProperty(PropertyName = "sasUrl")] - public string SasUrl { get; set; } - - /// - /// Gets or sets retention in days. - /// Remove blobs older than X days. - /// 0 or lower means no retention. - /// - [JsonProperty(PropertyName = "retentionInDays")] - public int? RetentionInDays { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageHttpLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageHttpLogsConfig.cs deleted file mode 100644 index c192a6ca93fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureBlobStorageHttpLogsConfig.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Http logs to azure blob storage configuration. - /// - public partial class AzureBlobStorageHttpLogsConfig - { - /// - /// Initializes a new instance of the AzureBlobStorageHttpLogsConfig - /// class. - /// - public AzureBlobStorageHttpLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureBlobStorageHttpLogsConfig - /// class. - /// - /// SAS url to a azure blob container with - /// read/write/list/delete permissions. - /// Retention in days. - /// Remove blobs older than X days. - /// 0 or lower means no retention. - /// True if configuration is enabled, false if it - /// is disabled and null if configuration is not set. - public AzureBlobStorageHttpLogsConfig(string sasUrl = default(string), int? retentionInDays = default(int?), bool? enabled = default(bool?)) - { - SasUrl = sasUrl; - RetentionInDays = retentionInDays; - Enabled = enabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets SAS url to a azure blob container with - /// read/write/list/delete permissions. - /// - [JsonProperty(PropertyName = "sasUrl")] - public string SasUrl { get; set; } - - /// - /// Gets or sets retention in days. - /// Remove blobs older than X days. - /// 0 or lower means no retention. - /// - [JsonProperty(PropertyName = "retentionInDays")] - public int? RetentionInDays { get; set; } - - /// - /// Gets or sets true if configuration is enabled, false if it is - /// disabled and null if configuration is not set. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureResourceType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureResourceType.cs deleted file mode 100644 index ea35b94ba2e5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureResourceType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AzureResourceType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AzureResourceType - { - [EnumMember(Value = "Website")] - Website, - [EnumMember(Value = "TrafficManager")] - TrafficManager - } - internal static class AzureResourceTypeEnumExtension - { - internal static string ToSerializedValue(this AzureResourceType? value) - { - return value == null ? null : ((AzureResourceType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AzureResourceType value) - { - switch( value ) - { - case AzureResourceType.Website: - return "Website"; - case AzureResourceType.TrafficManager: - return "TrafficManager"; - } - return null; - } - - internal static AzureResourceType? ParseAzureResourceType(this string value) - { - switch( value ) - { - case "Website": - return AzureResourceType.Website; - case "TrafficManager": - return AzureResourceType.TrafficManager; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs deleted file mode 100644 index 402802981d6a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebApps.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Azure Static Web Apps provider. - /// - public partial class AzureStaticWebApps - { - /// - /// Initializes a new instance of the AzureStaticWebApps class. - /// - public AzureStaticWebApps() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureStaticWebApps class. - /// - /// <code>false</code> if the Azure - /// Static Web Apps provider should not be enabled despite the set - /// registration; otherwise, <code>true</code>. - /// The configuration settings of the Azure - /// Static Web Apps registration. - public AzureStaticWebApps(bool? enabled = default(bool?), AzureStaticWebAppsRegistration registration = default(AzureStaticWebAppsRegistration)) - { - Enabled = enabled; - Registration = registration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Azure Static Web Apps provider should not be enabled despite the - /// set registration; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Static Web - /// Apps registration. - /// - [JsonProperty(PropertyName = "registration")] - public AzureStaticWebAppsRegistration Registration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs deleted file mode 100644 index efecde941530..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStaticWebAppsRegistration.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the registration for the Azure Static Web - /// Apps provider - /// - public partial class AzureStaticWebAppsRegistration - { - /// - /// Initializes a new instance of the AzureStaticWebAppsRegistration - /// class. - /// - public AzureStaticWebAppsRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureStaticWebAppsRegistration - /// class. - /// - /// The Client ID of the app used for - /// login. - public AzureStaticWebAppsRegistration(string clientId = default(string)) - { - ClientId = clientId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Client ID of the app used for login. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs deleted file mode 100644 index 58973e11d2a7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageInfoValue.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Azure Files or Blob Storage access information value for dictionary - /// storage. - /// - public partial class AzureStorageInfoValue - { - /// - /// Initializes a new instance of the AzureStorageInfoValue class. - /// - public AzureStorageInfoValue() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the AzureStorageInfoValue class. - /// - /// Type of storage. Possible values include: - /// 'AzureFiles', 'AzureBlob' - /// Name of the storage account. - /// Name of the file share (container name, for - /// Blob storage). - /// Access key for the storage account. - /// Path to mount the storage within the site's - /// runtime environment. - /// State of the storage account. Possible values - /// include: 'Ok', 'InvalidCredentials', 'InvalidShare', - /// 'NotValidated' - public AzureStorageInfoValue(AzureStorageType? type = default(AzureStorageType?), string accountName = default(string), string shareName = default(string), string accessKey = default(string), string mountPath = default(string), AzureStorageState? state = default(AzureStorageState?)) - { - Type = type; - AccountName = accountName; - ShareName = shareName; - AccessKey = accessKey; - MountPath = mountPath; - State = state; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of storage. Possible values include: - /// 'AzureFiles', 'AzureBlob' - /// - [JsonProperty(PropertyName = "type")] - public AzureStorageType? Type { get; set; } - - /// - /// Gets or sets name of the storage account. - /// - [JsonProperty(PropertyName = "accountName")] - public string AccountName { get; set; } - - /// - /// Gets or sets name of the file share (container name, for Blob - /// storage). - /// - [JsonProperty(PropertyName = "shareName")] - public string ShareName { get; set; } - - /// - /// Gets or sets access key for the storage account. - /// - [JsonProperty(PropertyName = "accessKey")] - public string AccessKey { get; set; } - - /// - /// Gets or sets path to mount the storage within the site's runtime - /// environment. - /// - [JsonProperty(PropertyName = "mountPath")] - public string MountPath { get; set; } - - /// - /// Gets state of the storage account. Possible values include: 'Ok', - /// 'InvalidCredentials', 'InvalidShare', 'NotValidated' - /// - [JsonProperty(PropertyName = "state")] - public AzureStorageState? State { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStoragePropertyDictionaryResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStoragePropertyDictionaryResource.cs deleted file mode 100644 index 331960cea659..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStoragePropertyDictionaryResource.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// AzureStorageInfo dictionary resource. - /// - public partial class AzureStoragePropertyDictionaryResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// AzureStoragePropertyDictionaryResource class. - /// - public AzureStoragePropertyDictionaryResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AzureStoragePropertyDictionaryResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Azure storage accounts. - public AzureStoragePropertyDictionaryResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary properties = default(IDictionary)) - : base(id, name, kind, type) - { - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets azure storage accounts. - /// - [JsonProperty(PropertyName = "properties")] - public IDictionary Properties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs deleted file mode 100644 index dd8e18dc45a5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageState.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AzureStorageState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AzureStorageState - { - [EnumMember(Value = "Ok")] - Ok, - [EnumMember(Value = "InvalidCredentials")] - InvalidCredentials, - [EnumMember(Value = "InvalidShare")] - InvalidShare, - [EnumMember(Value = "NotValidated")] - NotValidated - } - internal static class AzureStorageStateEnumExtension - { - internal static string ToSerializedValue(this AzureStorageState? value) - { - return value == null ? null : ((AzureStorageState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AzureStorageState value) - { - switch( value ) - { - case AzureStorageState.Ok: - return "Ok"; - case AzureStorageState.InvalidCredentials: - return "InvalidCredentials"; - case AzureStorageState.InvalidShare: - return "InvalidShare"; - case AzureStorageState.NotValidated: - return "NotValidated"; - } - return null; - } - - internal static AzureStorageState? ParseAzureStorageState(this string value) - { - switch( value ) - { - case "Ok": - return AzureStorageState.Ok; - case "InvalidCredentials": - return AzureStorageState.InvalidCredentials; - case "InvalidShare": - return AzureStorageState.InvalidShare; - case "NotValidated": - return AzureStorageState.NotValidated; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageType.cs deleted file mode 100644 index 15dcdf17157f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureStorageType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for AzureStorageType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum AzureStorageType - { - [EnumMember(Value = "AzureFiles")] - AzureFiles, - [EnumMember(Value = "AzureBlob")] - AzureBlob - } - internal static class AzureStorageTypeEnumExtension - { - internal static string ToSerializedValue(this AzureStorageType? value) - { - return value == null ? null : ((AzureStorageType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this AzureStorageType value) - { - switch( value ) - { - case AzureStorageType.AzureFiles: - return "AzureFiles"; - case AzureStorageType.AzureBlob: - return "AzureBlob"; - } - return null; - } - - internal static AzureStorageType? ParseAzureStorageType(this string value) - { - switch( value ) - { - case "AzureFiles": - return AzureStorageType.AzureFiles; - case "AzureBlob": - return AzureStorageType.AzureBlob; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureTableStorageApplicationLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureTableStorageApplicationLogsConfig.cs deleted file mode 100644 index a44928dcfd91..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/AzureTableStorageApplicationLogsConfig.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Application logs to Azure table storage configuration. - /// - public partial class AzureTableStorageApplicationLogsConfig - { - /// - /// Initializes a new instance of the - /// AzureTableStorageApplicationLogsConfig class. - /// - public AzureTableStorageApplicationLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// AzureTableStorageApplicationLogsConfig class. - /// - /// SAS URL to an Azure table with - /// add/query/delete permissions. - /// Log level. Possible values include: 'Off', - /// 'Verbose', 'Information', 'Warning', 'Error' - public AzureTableStorageApplicationLogsConfig(string sasUrl, LogLevel? level = default(LogLevel?)) - { - Level = level; - SasUrl = sasUrl; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets log level. Possible values include: 'Off', 'Verbose', - /// 'Information', 'Warning', 'Error' - /// - [JsonProperty(PropertyName = "level")] - public LogLevel? Level { get; set; } - - /// - /// Gets or sets SAS URL to an Azure table with add/query/delete - /// permissions. - /// - [JsonProperty(PropertyName = "sasUrl")] - public string SasUrl { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SasUrl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SasUrl"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItem.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItem.cs deleted file mode 100644 index d88db9a81169..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItem.cs +++ /dev/null @@ -1,183 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Backup description. - /// - [Rest.Serialization.JsonTransformation] - public partial class BackupItem : ProxyOnlyResource - { - /// - /// Initializes a new instance of the BackupItem class. - /// - public BackupItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BackupItem class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Id of the backup. - /// SAS URL for the storage account - /// container which contains this backup. - /// Name of the blob which contains data for - /// this backup. - /// Name of this backup. - /// Backup status. Possible values include: - /// 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', - /// 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', - /// 'DeleteFailed', 'Deleted' - /// Size of the backup in bytes. - /// Timestamp of the backup creation. - /// Details regarding this backup. Might contain an - /// error message. - /// List of databases included in the - /// backup. - /// True if this backup has been created due to - /// a schedule being triggered. - /// Timestamp of a last restore - /// operation which used this backup. - /// Timestamp when this backup - /// finished. - /// Unique correlation identifier. Please - /// use this along with the timestamp while communicating with Azure - /// support. - /// Size of the original web app which - /// has been backed up. - public BackupItem(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? backupId = default(int?), string storageAccountUrl = default(string), string blobName = default(string), string backupItemName = default(string), BackupItemStatus? status = default(BackupItemStatus?), long? sizeInBytes = default(long?), System.DateTime? created = default(System.DateTime?), string log = default(string), IList databases = default(IList), bool? scheduled = default(bool?), System.DateTime? lastRestoreTimeStamp = default(System.DateTime?), System.DateTime? finishedTimeStamp = default(System.DateTime?), string correlationId = default(string), long? websiteSizeInBytes = default(long?)) - : base(id, name, kind, type) - { - BackupId = backupId; - StorageAccountUrl = storageAccountUrl; - BlobName = blobName; - BackupItemName = backupItemName; - Status = status; - SizeInBytes = sizeInBytes; - Created = created; - Log = log; - Databases = databases; - Scheduled = scheduled; - LastRestoreTimeStamp = lastRestoreTimeStamp; - FinishedTimeStamp = finishedTimeStamp; - CorrelationId = correlationId; - WebsiteSizeInBytes = websiteSizeInBytes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets id of the backup. - /// - [JsonProperty(PropertyName = "properties.id")] - public int? BackupId { get; private set; } - - /// - /// Gets SAS URL for the storage account container which contains this - /// backup. - /// - [JsonProperty(PropertyName = "properties.storageAccountUrl")] - public string StorageAccountUrl { get; private set; } - - /// - /// Gets name of the blob which contains data for this backup. - /// - [JsonProperty(PropertyName = "properties.blobName")] - public string BlobName { get; private set; } - - /// - /// Gets name of this backup. - /// - [JsonProperty(PropertyName = "properties.name")] - public string BackupItemName { get; private set; } - - /// - /// Gets backup status. Possible values include: 'InProgress', - /// 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', - /// 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted' - /// - [JsonProperty(PropertyName = "properties.status")] - public BackupItemStatus? Status { get; private set; } - - /// - /// Gets size of the backup in bytes. - /// - [JsonProperty(PropertyName = "properties.sizeInBytes")] - public long? SizeInBytes { get; private set; } - - /// - /// Gets timestamp of the backup creation. - /// - [JsonProperty(PropertyName = "properties.created")] - public System.DateTime? Created { get; private set; } - - /// - /// Gets details regarding this backup. Might contain an error message. - /// - [JsonProperty(PropertyName = "properties.log")] - public string Log { get; private set; } - - /// - /// Gets list of databases included in the backup. - /// - [JsonProperty(PropertyName = "properties.databases")] - public IList Databases { get; private set; } - - /// - /// Gets true if this backup has been created due to a schedule being - /// triggered. - /// - [JsonProperty(PropertyName = "properties.scheduled")] - public bool? Scheduled { get; private set; } - - /// - /// Gets timestamp of a last restore operation which used this backup. - /// - [JsonProperty(PropertyName = "properties.lastRestoreTimeStamp")] - public System.DateTime? LastRestoreTimeStamp { get; private set; } - - /// - /// Gets timestamp when this backup finished. - /// - [JsonProperty(PropertyName = "properties.finishedTimeStamp")] - public System.DateTime? FinishedTimeStamp { get; private set; } - - /// - /// Gets unique correlation identifier. Please use this along with the - /// timestamp while communicating with Azure support. - /// - [JsonProperty(PropertyName = "properties.correlationId")] - public string CorrelationId { get; private set; } - - /// - /// Gets size of the original web app which has been backed up. - /// - [JsonProperty(PropertyName = "properties.websiteSizeInBytes")] - public long? WebsiteSizeInBytes { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItemStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItemStatus.cs deleted file mode 100644 index e2752ce9307d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupItemStatus.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for BackupItemStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BackupItemStatus - { - [EnumMember(Value = "InProgress")] - InProgress, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Succeeded")] - Succeeded, - [EnumMember(Value = "TimedOut")] - TimedOut, - [EnumMember(Value = "Created")] - Created, - [EnumMember(Value = "Skipped")] - Skipped, - [EnumMember(Value = "PartiallySucceeded")] - PartiallySucceeded, - [EnumMember(Value = "DeleteInProgress")] - DeleteInProgress, - [EnumMember(Value = "DeleteFailed")] - DeleteFailed, - [EnumMember(Value = "Deleted")] - Deleted - } - internal static class BackupItemStatusEnumExtension - { - internal static string ToSerializedValue(this BackupItemStatus? value) - { - return value == null ? null : ((BackupItemStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this BackupItemStatus value) - { - switch( value ) - { - case BackupItemStatus.InProgress: - return "InProgress"; - case BackupItemStatus.Failed: - return "Failed"; - case BackupItemStatus.Succeeded: - return "Succeeded"; - case BackupItemStatus.TimedOut: - return "TimedOut"; - case BackupItemStatus.Created: - return "Created"; - case BackupItemStatus.Skipped: - return "Skipped"; - case BackupItemStatus.PartiallySucceeded: - return "PartiallySucceeded"; - case BackupItemStatus.DeleteInProgress: - return "DeleteInProgress"; - case BackupItemStatus.DeleteFailed: - return "DeleteFailed"; - case BackupItemStatus.Deleted: - return "Deleted"; - } - return null; - } - - internal static BackupItemStatus? ParseBackupItemStatus(this string value) - { - switch( value ) - { - case "InProgress": - return BackupItemStatus.InProgress; - case "Failed": - return BackupItemStatus.Failed; - case "Succeeded": - return BackupItemStatus.Succeeded; - case "TimedOut": - return BackupItemStatus.TimedOut; - case "Created": - return BackupItemStatus.Created; - case "Skipped": - return BackupItemStatus.Skipped; - case "PartiallySucceeded": - return BackupItemStatus.PartiallySucceeded; - case "DeleteInProgress": - return BackupItemStatus.DeleteInProgress; - case "DeleteFailed": - return BackupItemStatus.DeleteFailed; - case "Deleted": - return BackupItemStatus.Deleted; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRequest.cs deleted file mode 100644 index 8a5bda6bc021..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRequest.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of a backup which will be performed. - /// - [Rest.Serialization.JsonTransformation] - public partial class BackupRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the BackupRequest class. - /// - public BackupRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BackupRequest class. - /// - /// SAS URL to the container. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Name of the backup. - /// True if the backup schedule is enabled (must - /// be included in that case), false if the backup schedule should be - /// disabled. - /// Schedule for the backup if it is - /// executed periodically. - /// Databases included in the backup. - public BackupRequest(string storageAccountUrl, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string backupName = default(string), bool? enabled = default(bool?), BackupSchedule backupSchedule = default(BackupSchedule), IList databases = default(IList)) - : base(id, name, kind, type) - { - BackupName = backupName; - Enabled = enabled; - StorageAccountUrl = storageAccountUrl; - BackupSchedule = backupSchedule; - Databases = databases; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the backup. - /// - [JsonProperty(PropertyName = "properties.backupName")] - public string BackupName { get; set; } - - /// - /// Gets or sets true if the backup schedule is enabled (must be - /// included in that case), false if the backup schedule should be - /// disabled. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets SAS URL to the container. - /// - [JsonProperty(PropertyName = "properties.storageAccountUrl")] - public string StorageAccountUrl { get; set; } - - /// - /// Gets or sets schedule for the backup if it is executed - /// periodically. - /// - [JsonProperty(PropertyName = "properties.backupSchedule")] - public BackupSchedule BackupSchedule { get; set; } - - /// - /// Gets or sets databases included in the backup. - /// - [JsonProperty(PropertyName = "properties.databases")] - public IList Databases { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (StorageAccountUrl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccountUrl"); - } - if (BackupSchedule != null) - { - BackupSchedule.Validate(); - } - if (Databases != null) - { - foreach (var element in Databases) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRestoreOperationType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRestoreOperationType.cs deleted file mode 100644 index bc7721d2bbd7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupRestoreOperationType.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for BackupRestoreOperationType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BackupRestoreOperationType - { - [EnumMember(Value = "Default")] - Default, - [EnumMember(Value = "Clone")] - Clone, - [EnumMember(Value = "Relocation")] - Relocation, - [EnumMember(Value = "Snapshot")] - Snapshot, - [EnumMember(Value = "CloudFS")] - CloudFS - } - internal static class BackupRestoreOperationTypeEnumExtension - { - internal static string ToSerializedValue(this BackupRestoreOperationType? value) - { - return value == null ? null : ((BackupRestoreOperationType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this BackupRestoreOperationType value) - { - switch( value ) - { - case BackupRestoreOperationType.Default: - return "Default"; - case BackupRestoreOperationType.Clone: - return "Clone"; - case BackupRestoreOperationType.Relocation: - return "Relocation"; - case BackupRestoreOperationType.Snapshot: - return "Snapshot"; - case BackupRestoreOperationType.CloudFS: - return "CloudFS"; - } - return null; - } - - internal static BackupRestoreOperationType? ParseBackupRestoreOperationType(this string value) - { - switch( value ) - { - case "Default": - return BackupRestoreOperationType.Default; - case "Clone": - return BackupRestoreOperationType.Clone; - case "Relocation": - return BackupRestoreOperationType.Relocation; - case "Snapshot": - return BackupRestoreOperationType.Snapshot; - case "CloudFS": - return BackupRestoreOperationType.CloudFS; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupSchedule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupSchedule.cs deleted file mode 100644 index ca17ab471980..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BackupSchedule.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description of a backup schedule. Describes how often should be the - /// backup performed and what should be the retention policy. - /// - public partial class BackupSchedule - { - /// - /// Initializes a new instance of the BackupSchedule class. - /// - public BackupSchedule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BackupSchedule class. - /// - /// How often the backup should be - /// executed (e.g. for weekly backup, this should be set to 7 and - /// FrequencyUnit should be set to Day) - /// The unit of time for how often the - /// backup should be executed (e.g. for weekly backup, this should be - /// set to Day and FrequencyInterval should be set to 7). Possible - /// values include: 'Day', 'Hour' - /// True if the retention policy - /// should always keep at least one backup in the storage account, - /// regardless how old it is; false otherwise. - /// After how many days backups - /// should be deleted. - /// When the schedule should start - /// working. - /// Last time when this schedule was - /// triggered. - public BackupSchedule(int frequencyInterval, FrequencyUnit frequencyUnit, bool keepAtLeastOneBackup, int retentionPeriodInDays, System.DateTime? startTime = default(System.DateTime?), System.DateTime? lastExecutionTime = default(System.DateTime?)) - { - FrequencyInterval = frequencyInterval; - FrequencyUnit = frequencyUnit; - KeepAtLeastOneBackup = keepAtLeastOneBackup; - RetentionPeriodInDays = retentionPeriodInDays; - StartTime = startTime; - LastExecutionTime = lastExecutionTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets how often the backup should be executed (e.g. for - /// weekly backup, this should be set to 7 and FrequencyUnit should be - /// set to Day) - /// - [JsonProperty(PropertyName = "frequencyInterval")] - public int FrequencyInterval { get; set; } - - /// - /// Gets or sets the unit of time for how often the backup should be - /// executed (e.g. for weekly backup, this should be set to Day and - /// FrequencyInterval should be set to 7). Possible values include: - /// 'Day', 'Hour' - /// - [JsonProperty(PropertyName = "frequencyUnit")] - public FrequencyUnit FrequencyUnit { get; set; } - - /// - /// Gets or sets true if the retention policy should always keep at - /// least one backup in the storage account, regardless how old it is; - /// false otherwise. - /// - [JsonProperty(PropertyName = "keepAtLeastOneBackup")] - public bool KeepAtLeastOneBackup { get; set; } - - /// - /// Gets or sets after how many days backups should be deleted. - /// - [JsonProperty(PropertyName = "retentionPeriodInDays")] - public int RetentionPeriodInDays { get; set; } - - /// - /// Gets or sets when the schedule should start working. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets last time when this schedule was triggered. - /// - [JsonProperty(PropertyName = "lastExecutionTime")] - public System.DateTime? LastExecutionTime { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs deleted file mode 100644 index 592906a09b62..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BillingMeter.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// App Service billing entity that contains information about meter which - /// the Azure billing system utilizes to charge users for services. - /// - [Rest.Serialization.JsonTransformation] - public partial class BillingMeter : ProxyOnlyResource - { - /// - /// Initializes a new instance of the BillingMeter class. - /// - public BillingMeter() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BillingMeter class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Meter GUID onboarded in Commerce - /// Azure Location of billable - /// resource - /// Short Name from App Service Azure pricing - /// Page - /// Friendly name of the meter - /// App Service ResourceType meter used - /// for - /// App Service OS type meter used for - /// Meter Multiplier - public BillingMeter(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string meterId = default(string), string billingLocation = default(string), string shortName = default(string), string friendlyName = default(string), string resourceType = default(string), string osType = default(string), double? multiplier = default(double?)) - : base(id, name, kind, type) - { - MeterId = meterId; - BillingLocation = billingLocation; - ShortName = shortName; - FriendlyName = friendlyName; - ResourceType = resourceType; - OsType = osType; - Multiplier = multiplier; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets meter GUID onboarded in Commerce - /// - [JsonProperty(PropertyName = "properties.meterId")] - public string MeterId { get; set; } - - /// - /// Gets or sets azure Location of billable resource - /// - [JsonProperty(PropertyName = "properties.billingLocation")] - public string BillingLocation { get; set; } - - /// - /// Gets or sets short Name from App Service Azure pricing Page - /// - [JsonProperty(PropertyName = "properties.shortName")] - public string ShortName { get; set; } - - /// - /// Gets or sets friendly name of the meter - /// - [JsonProperty(PropertyName = "properties.friendlyName")] - public string FriendlyName { get; set; } - - /// - /// Gets or sets app Service ResourceType meter used for - /// - [JsonProperty(PropertyName = "properties.resourceType")] - public string ResourceType { get; set; } - - /// - /// Gets or sets app Service OS type meter used for - /// - [JsonProperty(PropertyName = "properties.osType")] - public string OsType { get; set; } - - /// - /// Gets or sets meter Multiplier - /// - [JsonProperty(PropertyName = "properties.multiplier")] - public double? Multiplier { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs deleted file mode 100644 index 24de4ad0da64..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BlobStorageTokenStore.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the storage of the tokens if blob storage - /// is used. - /// - public partial class BlobStorageTokenStore - { - /// - /// Initializes a new instance of the BlobStorageTokenStore class. - /// - public BlobStorageTokenStore() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the BlobStorageTokenStore class. - /// - /// The name of the app setting - /// containing the SAS URL of the blob storage containing the - /// tokens. - public BlobStorageTokenStore(string sasUrlSettingName = default(string)) - { - SasUrlSettingName = sasUrlSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the app setting containing the SAS URL of - /// the blob storage containing the tokens. - /// - [JsonProperty(PropertyName = "sasUrlSettingName")] - public string SasUrlSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuildStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuildStatus.cs deleted file mode 100644 index 108549cc3987..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuildStatus.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for BuildStatus. - /// - public static class BuildStatus - { - public const string WaitingForDeployment = "WaitingForDeployment"; - public const string Uploading = "Uploading"; - public const string Deploying = "Deploying"; - public const string Ready = "Ready"; - public const string Failed = "Failed"; - public const string Deleting = "Deleting"; - public const string Detached = "Detached"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuiltInAuthenticationProvider.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuiltInAuthenticationProvider.cs deleted file mode 100644 index 7c1d8d8ded9a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/BuiltInAuthenticationProvider.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for BuiltInAuthenticationProvider. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum BuiltInAuthenticationProvider - { - [EnumMember(Value = "AzureActiveDirectory")] - AzureActiveDirectory, - [EnumMember(Value = "Facebook")] - Facebook, - [EnumMember(Value = "Google")] - Google, - [EnumMember(Value = "MicrosoftAccount")] - MicrosoftAccount, - [EnumMember(Value = "Twitter")] - Twitter, - [EnumMember(Value = "Github")] - Github - } - internal static class BuiltInAuthenticationProviderEnumExtension - { - internal static string ToSerializedValue(this BuiltInAuthenticationProvider? value) - { - return value == null ? null : ((BuiltInAuthenticationProvider)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this BuiltInAuthenticationProvider value) - { - switch( value ) - { - case BuiltInAuthenticationProvider.AzureActiveDirectory: - return "AzureActiveDirectory"; - case BuiltInAuthenticationProvider.Facebook: - return "Facebook"; - case BuiltInAuthenticationProvider.Google: - return "Google"; - case BuiltInAuthenticationProvider.MicrosoftAccount: - return "MicrosoftAccount"; - case BuiltInAuthenticationProvider.Twitter: - return "Twitter"; - case BuiltInAuthenticationProvider.Github: - return "Github"; - } - return null; - } - - internal static BuiltInAuthenticationProvider? ParseBuiltInAuthenticationProvider(this string value) - { - switch( value ) - { - case "AzureActiveDirectory": - return BuiltInAuthenticationProvider.AzureActiveDirectory; - case "Facebook": - return BuiltInAuthenticationProvider.Facebook; - case "Google": - return BuiltInAuthenticationProvider.Google; - case "MicrosoftAccount": - return BuiltInAuthenticationProvider.MicrosoftAccount; - case "Twitter": - return BuiltInAuthenticationProvider.Twitter; - case "Github": - return BuiltInAuthenticationProvider.Github; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Capability.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Capability.cs deleted file mode 100644 index 789072a1e19a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Capability.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the capabilities/features allowed for a specific SKU. - /// - public partial class Capability - { - /// - /// Initializes a new instance of the Capability class. - /// - public Capability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Capability class. - /// - /// Name of the SKU capability. - /// Value of the SKU capability. - /// Reason of the SKU capability. - public Capability(string name = default(string), string value = default(string), string reason = default(string)) - { - Name = name; - Value = value; - Reason = reason; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the SKU capability. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets value of the SKU capability. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Gets or sets reason of the SKU capability. - /// - [JsonProperty(PropertyName = "reason")] - public string Reason { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs deleted file mode 100644 index 3b586e1571db..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Certificate.cs +++ /dev/null @@ -1,255 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// SSL certificate for an app. - /// - [Rest.Serialization.JsonTransformation] - public partial class Certificate : Resource - { - /// - /// Initializes a new instance of the Certificate class. - /// - public Certificate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Certificate class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Certificate password. - /// Friendly name of the - /// certificate. - /// Subject name of the certificate. - /// Host names the certificate applies - /// to. - /// Pfx blob. - /// App name. - /// Self link. - /// Certificate issuer. - /// Certificate issue Date. - /// Certificate expiration date. - /// Certificate thumbprint. - /// Is the certificate valid?. - /// Raw bytes of .cer file - /// Public key hash. - /// Specification for the App - /// Service Environment to use for the certificate. - /// Key Vault Csm resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Possible values include: 'Initialized', - /// 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', - /// 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// Resource ID of the associated App - /// Service plan, formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// CNAME of the certificate to be issued - /// via free certificate - /// Method of domain validation - /// for free cert - public Certificate(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string password = default(string), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string), string domainValidationMethod = default(string)) - : base(location, id, name, kind, type, tags) - { - Password = password; - FriendlyName = friendlyName; - SubjectName = subjectName; - HostNames = hostNames; - PfxBlob = pfxBlob; - SiteName = siteName; - SelfLink = selfLink; - Issuer = issuer; - IssueDate = issueDate; - ExpirationDate = expirationDate; - Thumbprint = thumbprint; - Valid = valid; - CerBlob = cerBlob; - PublicKeyHash = publicKeyHash; - HostingEnvironmentProfile = hostingEnvironmentProfile; - KeyVaultId = keyVaultId; - KeyVaultSecretName = keyVaultSecretName; - KeyVaultSecretStatus = keyVaultSecretStatus; - ServerFarmId = serverFarmId; - CanonicalName = canonicalName; - DomainValidationMethod = domainValidationMethod; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets certificate password. - /// - [JsonProperty(PropertyName = "properties.password")] - public string Password { get; set; } - - /// - /// Gets friendly name of the certificate. - /// - [JsonProperty(PropertyName = "properties.friendlyName")] - public string FriendlyName { get; private set; } - - /// - /// Gets subject name of the certificate. - /// - [JsonProperty(PropertyName = "properties.subjectName")] - public string SubjectName { get; private set; } - - /// - /// Gets or sets host names the certificate applies to. - /// - [JsonProperty(PropertyName = "properties.hostNames")] - public IList HostNames { get; set; } - - /// - /// Gets or sets pfx blob. - /// - [JsonProperty(PropertyName = "properties.pfxBlob")] - public byte[] PfxBlob { get; set; } - - /// - /// Gets app name. - /// - [JsonProperty(PropertyName = "properties.siteName")] - public string SiteName { get; private set; } - - /// - /// Gets self link. - /// - [JsonProperty(PropertyName = "properties.selfLink")] - public string SelfLink { get; private set; } - - /// - /// Gets certificate issuer. - /// - [JsonProperty(PropertyName = "properties.issuer")] - public string Issuer { get; private set; } - - /// - /// Gets certificate issue Date. - /// - [JsonProperty(PropertyName = "properties.issueDate")] - public System.DateTime? IssueDate { get; private set; } - - /// - /// Gets certificate expiration date. - /// - [JsonProperty(PropertyName = "properties.expirationDate")] - public System.DateTime? ExpirationDate { get; private set; } - - /// - /// Gets certificate thumbprint. - /// - [JsonProperty(PropertyName = "properties.thumbprint")] - public string Thumbprint { get; private set; } - - /// - /// Gets is the certificate valid?. - /// - [JsonProperty(PropertyName = "properties.valid")] - public bool? Valid { get; private set; } - - /// - /// Gets raw bytes of .cer file - /// - [JsonProperty(PropertyName = "properties.cerBlob")] - public byte[] CerBlob { get; private set; } - - /// - /// Gets public key hash. - /// - [JsonProperty(PropertyName = "properties.publicKeyHash")] - public string PublicKeyHash { get; private set; } - - /// - /// Gets specification for the App Service Environment to use for the - /// certificate. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; private set; } - - /// - /// Gets or sets key Vault Csm resource Id. - /// - [JsonProperty(PropertyName = "properties.keyVaultId")] - public string KeyVaultId { get; set; } - - /// - /// Gets or sets key Vault secret name. - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretName")] - public string KeyVaultSecretName { get; set; } - - /// - /// Gets status of the Key Vault secret. Possible values include: - /// 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', - /// 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretStatus")] - public KeyVaultSecretStatus? KeyVaultSecretStatus { get; private set; } - - /// - /// Gets or sets resource ID of the associated App Service plan, - /// formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// - [JsonProperty(PropertyName = "properties.serverFarmId")] - public string ServerFarmId { get; set; } - - /// - /// Gets or sets CNAME of the certificate to be issued via free - /// certificate - /// - [JsonProperty(PropertyName = "properties.canonicalName")] - public string CanonicalName { get; set; } - - /// - /// Gets or sets method of domain validation for free cert - /// - [JsonProperty(PropertyName = "properties.domainValidationMethod")] - public string DomainValidationMethod { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateDetails.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateDetails.cs deleted file mode 100644 index 88da305a42c3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateDetails.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// SSL certificate details. - /// - public partial class CertificateDetails - { - /// - /// Initializes a new instance of the CertificateDetails class. - /// - public CertificateDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CertificateDetails class. - /// - /// Certificate Version. - /// Certificate Serial Number. - /// Certificate Thumbprint. - /// Certificate Subject. - /// Date Certificate is valid from. - /// Date Certificate is valid to. - /// Certificate Signature - /// algorithm. - /// Certificate Issuer. - /// Raw certificate data. - public CertificateDetails(int? version = default(int?), string serialNumber = default(string), string thumbprint = default(string), string subject = default(string), System.DateTime? notBefore = default(System.DateTime?), System.DateTime? notAfter = default(System.DateTime?), string signatureAlgorithm = default(string), string issuer = default(string), string rawData = default(string)) - { - Version = version; - SerialNumber = serialNumber; - Thumbprint = thumbprint; - Subject = subject; - NotBefore = notBefore; - NotAfter = notAfter; - SignatureAlgorithm = signatureAlgorithm; - Issuer = issuer; - RawData = rawData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets certificate Version. - /// - [JsonProperty(PropertyName = "version")] - public int? Version { get; private set; } - - /// - /// Gets certificate Serial Number. - /// - [JsonProperty(PropertyName = "serialNumber")] - public string SerialNumber { get; private set; } - - /// - /// Gets certificate Thumbprint. - /// - [JsonProperty(PropertyName = "thumbprint")] - public string Thumbprint { get; private set; } - - /// - /// Gets certificate Subject. - /// - [JsonProperty(PropertyName = "subject")] - public string Subject { get; private set; } - - /// - /// Gets date Certificate is valid from. - /// - [JsonProperty(PropertyName = "notBefore")] - public System.DateTime? NotBefore { get; private set; } - - /// - /// Gets date Certificate is valid to. - /// - [JsonProperty(PropertyName = "notAfter")] - public System.DateTime? NotAfter { get; private set; } - - /// - /// Gets certificate Signature algorithm. - /// - [JsonProperty(PropertyName = "signatureAlgorithm")] - public string SignatureAlgorithm { get; private set; } - - /// - /// Gets certificate Issuer. - /// - [JsonProperty(PropertyName = "issuer")] - public string Issuer { get; private set; } - - /// - /// Gets raw certificate data. - /// - [JsonProperty(PropertyName = "rawData")] - public string RawData { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateEmail.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateEmail.cs deleted file mode 100644 index 964709077aa5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateEmail.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// SSL certificate email. - /// - [Rest.Serialization.JsonTransformation] - public partial class CertificateEmail : ProxyOnlyResource - { - /// - /// Initializes a new instance of the CertificateEmail class. - /// - public CertificateEmail() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CertificateEmail class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Email id. - /// Time stamp. - public CertificateEmail(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string emailId = default(string), System.DateTime? timeStamp = default(System.DateTime?)) - : base(id, name, kind, type) - { - EmailId = emailId; - TimeStamp = timeStamp; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets email id. - /// - [JsonProperty(PropertyName = "properties.emailId")] - public string EmailId { get; set; } - - /// - /// Gets or sets time stamp. - /// - [JsonProperty(PropertyName = "properties.timeStamp")] - public System.DateTime? TimeStamp { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderAction.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderAction.cs deleted file mode 100644 index 19be35309378..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderAction.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Certificate order action. - /// - [Rest.Serialization.JsonTransformation] - public partial class CertificateOrderAction : ProxyOnlyResource - { - /// - /// Initializes a new instance of the CertificateOrderAction class. - /// - public CertificateOrderAction() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CertificateOrderAction class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Action type. Possible values include: - /// 'CertificateIssued', 'CertificateOrderCanceled', - /// 'CertificateOrderCreated', 'CertificateRevoked', - /// 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', - /// 'OrgValidationComplete', 'SanDrop', 'FraudCleared', - /// 'CertificateExpired', 'CertificateExpirationWarning', - /// 'FraudDocumentationRequired', 'Unknown' - /// Time at which the certificate action was - /// performed. - public CertificateOrderAction(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), CertificateOrderActionType? actionType = default(CertificateOrderActionType?), System.DateTime? createdAt = default(System.DateTime?)) - : base(id, name, kind, type) - { - ActionType = actionType; - CreatedAt = createdAt; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets action type. Possible values include: 'CertificateIssued', - /// 'CertificateOrderCanceled', 'CertificateOrderCreated', - /// 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', - /// 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', - /// 'FraudCleared', 'CertificateExpired', - /// 'CertificateExpirationWarning', 'FraudDocumentationRequired', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.actionType")] - public CertificateOrderActionType? ActionType { get; private set; } - - /// - /// Gets time at which the certificate action was performed. - /// - [JsonProperty(PropertyName = "properties.createdAt")] - public System.DateTime? CreatedAt { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderActionType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderActionType.cs deleted file mode 100644 index 6ada766d33f4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderActionType.cs +++ /dev/null @@ -1,132 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CertificateOrderActionType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CertificateOrderActionType - { - [EnumMember(Value = "CertificateIssued")] - CertificateIssued, - [EnumMember(Value = "CertificateOrderCanceled")] - CertificateOrderCanceled, - [EnumMember(Value = "CertificateOrderCreated")] - CertificateOrderCreated, - [EnumMember(Value = "CertificateRevoked")] - CertificateRevoked, - [EnumMember(Value = "DomainValidationComplete")] - DomainValidationComplete, - [EnumMember(Value = "FraudDetected")] - FraudDetected, - [EnumMember(Value = "OrgNameChange")] - OrgNameChange, - [EnumMember(Value = "OrgValidationComplete")] - OrgValidationComplete, - [EnumMember(Value = "SanDrop")] - SanDrop, - [EnumMember(Value = "FraudCleared")] - FraudCleared, - [EnumMember(Value = "CertificateExpired")] - CertificateExpired, - [EnumMember(Value = "CertificateExpirationWarning")] - CertificateExpirationWarning, - [EnumMember(Value = "FraudDocumentationRequired")] - FraudDocumentationRequired, - [EnumMember(Value = "Unknown")] - Unknown - } - internal static class CertificateOrderActionTypeEnumExtension - { - internal static string ToSerializedValue(this CertificateOrderActionType? value) - { - return value == null ? null : ((CertificateOrderActionType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CertificateOrderActionType value) - { - switch( value ) - { - case CertificateOrderActionType.CertificateIssued: - return "CertificateIssued"; - case CertificateOrderActionType.CertificateOrderCanceled: - return "CertificateOrderCanceled"; - case CertificateOrderActionType.CertificateOrderCreated: - return "CertificateOrderCreated"; - case CertificateOrderActionType.CertificateRevoked: - return "CertificateRevoked"; - case CertificateOrderActionType.DomainValidationComplete: - return "DomainValidationComplete"; - case CertificateOrderActionType.FraudDetected: - return "FraudDetected"; - case CertificateOrderActionType.OrgNameChange: - return "OrgNameChange"; - case CertificateOrderActionType.OrgValidationComplete: - return "OrgValidationComplete"; - case CertificateOrderActionType.SanDrop: - return "SanDrop"; - case CertificateOrderActionType.FraudCleared: - return "FraudCleared"; - case CertificateOrderActionType.CertificateExpired: - return "CertificateExpired"; - case CertificateOrderActionType.CertificateExpirationWarning: - return "CertificateExpirationWarning"; - case CertificateOrderActionType.FraudDocumentationRequired: - return "FraudDocumentationRequired"; - case CertificateOrderActionType.Unknown: - return "Unknown"; - } - return null; - } - - internal static CertificateOrderActionType? ParseCertificateOrderActionType(this string value) - { - switch( value ) - { - case "CertificateIssued": - return CertificateOrderActionType.CertificateIssued; - case "CertificateOrderCanceled": - return CertificateOrderActionType.CertificateOrderCanceled; - case "CertificateOrderCreated": - return CertificateOrderActionType.CertificateOrderCreated; - case "CertificateRevoked": - return CertificateOrderActionType.CertificateRevoked; - case "DomainValidationComplete": - return CertificateOrderActionType.DomainValidationComplete; - case "FraudDetected": - return CertificateOrderActionType.FraudDetected; - case "OrgNameChange": - return CertificateOrderActionType.OrgNameChange; - case "OrgValidationComplete": - return CertificateOrderActionType.OrgValidationComplete; - case "SanDrop": - return CertificateOrderActionType.SanDrop; - case "FraudCleared": - return CertificateOrderActionType.FraudCleared; - case "CertificateExpired": - return CertificateOrderActionType.CertificateExpired; - case "CertificateExpirationWarning": - return CertificateOrderActionType.CertificateExpirationWarning; - case "FraudDocumentationRequired": - return CertificateOrderActionType.FraudDocumentationRequired; - case "Unknown": - return CertificateOrderActionType.Unknown; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs deleted file mode 100644 index e5e1e23fea6c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderContact.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class CertificateOrderContact - { - /// - /// Initializes a new instance of the CertificateOrderContact class. - /// - public CertificateOrderContact() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CertificateOrderContact class. - /// - public CertificateOrderContact(string email = default(string), string nameFirst = default(string), string nameLast = default(string), string phone = default(string)) - { - Email = email; - NameFirst = nameFirst; - NameLast = nameLast; - Phone = phone; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "email")] - public string Email { get; set; } - - /// - /// - [JsonProperty(PropertyName = "nameFirst")] - public string NameFirst { get; set; } - - /// - /// - [JsonProperty(PropertyName = "nameLast")] - public string NameLast { get; set; } - - /// - /// - [JsonProperty(PropertyName = "phone")] - public string Phone { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderStatus.cs deleted file mode 100644 index 47bd350eb582..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateOrderStatus.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CertificateOrderStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CertificateOrderStatus - { - [EnumMember(Value = "Pendingissuance")] - Pendingissuance, - [EnumMember(Value = "Issued")] - Issued, - [EnumMember(Value = "Revoked")] - Revoked, - [EnumMember(Value = "Canceled")] - Canceled, - [EnumMember(Value = "Denied")] - Denied, - [EnumMember(Value = "Pendingrevocation")] - Pendingrevocation, - [EnumMember(Value = "PendingRekey")] - PendingRekey, - [EnumMember(Value = "Unused")] - Unused, - [EnumMember(Value = "Expired")] - Expired, - [EnumMember(Value = "NotSubmitted")] - NotSubmitted - } - internal static class CertificateOrderStatusEnumExtension - { - internal static string ToSerializedValue(this CertificateOrderStatus? value) - { - return value == null ? null : ((CertificateOrderStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CertificateOrderStatus value) - { - switch( value ) - { - case CertificateOrderStatus.Pendingissuance: - return "Pendingissuance"; - case CertificateOrderStatus.Issued: - return "Issued"; - case CertificateOrderStatus.Revoked: - return "Revoked"; - case CertificateOrderStatus.Canceled: - return "Canceled"; - case CertificateOrderStatus.Denied: - return "Denied"; - case CertificateOrderStatus.Pendingrevocation: - return "Pendingrevocation"; - case CertificateOrderStatus.PendingRekey: - return "PendingRekey"; - case CertificateOrderStatus.Unused: - return "Unused"; - case CertificateOrderStatus.Expired: - return "Expired"; - case CertificateOrderStatus.NotSubmitted: - return "NotSubmitted"; - } - return null; - } - - internal static CertificateOrderStatus? ParseCertificateOrderStatus(this string value) - { - switch( value ) - { - case "Pendingissuance": - return CertificateOrderStatus.Pendingissuance; - case "Issued": - return CertificateOrderStatus.Issued; - case "Revoked": - return CertificateOrderStatus.Revoked; - case "Canceled": - return CertificateOrderStatus.Canceled; - case "Denied": - return CertificateOrderStatus.Denied; - case "Pendingrevocation": - return CertificateOrderStatus.Pendingrevocation; - case "PendingRekey": - return CertificateOrderStatus.PendingRekey; - case "Unused": - return CertificateOrderStatus.Unused; - case "Expired": - return CertificateOrderStatus.Expired; - case "NotSubmitted": - return CertificateOrderStatus.NotSubmitted; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs deleted file mode 100644 index 126494ed2d53..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificatePatchResource.cs +++ /dev/null @@ -1,243 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a certificate. - /// - [Rest.Serialization.JsonTransformation] - public partial class CertificatePatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the CertificatePatchResource class. - /// - public CertificatePatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CertificatePatchResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Certificate password. - /// Friendly name of the - /// certificate. - /// Subject name of the certificate. - /// Host names the certificate applies - /// to. - /// Pfx blob. - /// App name. - /// Self link. - /// Certificate issuer. - /// Certificate issue Date. - /// Certificate expiration date. - /// Certificate thumbprint. - /// Is the certificate valid?. - /// Raw bytes of .cer file - /// Public key hash. - /// Specification for the App - /// Service Environment to use for the certificate. - /// Key Vault Csm resource Id. - /// Key Vault secret name. - /// Status of the Key Vault secret. - /// Possible values include: 'Initialized', - /// 'WaitingOnCertificateOrder', 'Succeeded', 'CertificateOrderFailed', - /// 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// Resource ID of the associated App - /// Service plan, formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// CNAME of the certificate to be issued - /// via free certificate - /// Method of domain validation - /// for free cert - public CertificatePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string password = default(string), string friendlyName = default(string), string subjectName = default(string), IList hostNames = default(IList), byte[] pfxBlob = default(byte[]), string siteName = default(string), string selfLink = default(string), string issuer = default(string), System.DateTime? issueDate = default(System.DateTime?), System.DateTime? expirationDate = default(System.DateTime?), string thumbprint = default(string), bool? valid = default(bool?), byte[] cerBlob = default(byte[]), string publicKeyHash = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), string keyVaultId = default(string), string keyVaultSecretName = default(string), KeyVaultSecretStatus? keyVaultSecretStatus = default(KeyVaultSecretStatus?), string serverFarmId = default(string), string canonicalName = default(string), string domainValidationMethod = default(string)) - : base(id, name, kind, type) - { - Password = password; - FriendlyName = friendlyName; - SubjectName = subjectName; - HostNames = hostNames; - PfxBlob = pfxBlob; - SiteName = siteName; - SelfLink = selfLink; - Issuer = issuer; - IssueDate = issueDate; - ExpirationDate = expirationDate; - Thumbprint = thumbprint; - Valid = valid; - CerBlob = cerBlob; - PublicKeyHash = publicKeyHash; - HostingEnvironmentProfile = hostingEnvironmentProfile; - KeyVaultId = keyVaultId; - KeyVaultSecretName = keyVaultSecretName; - KeyVaultSecretStatus = keyVaultSecretStatus; - ServerFarmId = serverFarmId; - CanonicalName = canonicalName; - DomainValidationMethod = domainValidationMethod; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets certificate password. - /// - [JsonProperty(PropertyName = "properties.password")] - public string Password { get; set; } - - /// - /// Gets friendly name of the certificate. - /// - [JsonProperty(PropertyName = "properties.friendlyName")] - public string FriendlyName { get; private set; } - - /// - /// Gets subject name of the certificate. - /// - [JsonProperty(PropertyName = "properties.subjectName")] - public string SubjectName { get; private set; } - - /// - /// Gets or sets host names the certificate applies to. - /// - [JsonProperty(PropertyName = "properties.hostNames")] - public IList HostNames { get; set; } - - /// - /// Gets or sets pfx blob. - /// - [JsonProperty(PropertyName = "properties.pfxBlob")] - public byte[] PfxBlob { get; set; } - - /// - /// Gets app name. - /// - [JsonProperty(PropertyName = "properties.siteName")] - public string SiteName { get; private set; } - - /// - /// Gets self link. - /// - [JsonProperty(PropertyName = "properties.selfLink")] - public string SelfLink { get; private set; } - - /// - /// Gets certificate issuer. - /// - [JsonProperty(PropertyName = "properties.issuer")] - public string Issuer { get; private set; } - - /// - /// Gets certificate issue Date. - /// - [JsonProperty(PropertyName = "properties.issueDate")] - public System.DateTime? IssueDate { get; private set; } - - /// - /// Gets certificate expiration date. - /// - [JsonProperty(PropertyName = "properties.expirationDate")] - public System.DateTime? ExpirationDate { get; private set; } - - /// - /// Gets certificate thumbprint. - /// - [JsonProperty(PropertyName = "properties.thumbprint")] - public string Thumbprint { get; private set; } - - /// - /// Gets is the certificate valid?. - /// - [JsonProperty(PropertyName = "properties.valid")] - public bool? Valid { get; private set; } - - /// - /// Gets raw bytes of .cer file - /// - [JsonProperty(PropertyName = "properties.cerBlob")] - public byte[] CerBlob { get; private set; } - - /// - /// Gets public key hash. - /// - [JsonProperty(PropertyName = "properties.publicKeyHash")] - public string PublicKeyHash { get; private set; } - - /// - /// Gets specification for the App Service Environment to use for the - /// certificate. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; private set; } - - /// - /// Gets or sets key Vault Csm resource Id. - /// - [JsonProperty(PropertyName = "properties.keyVaultId")] - public string KeyVaultId { get; set; } - - /// - /// Gets or sets key Vault secret name. - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretName")] - public string KeyVaultSecretName { get; set; } - - /// - /// Gets status of the Key Vault secret. Possible values include: - /// 'Initialized', 'WaitingOnCertificateOrder', 'Succeeded', - /// 'CertificateOrderFailed', 'OperationNotPermittedOnKeyVault', - /// 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', - /// 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', - /// 'Unknown' - /// - [JsonProperty(PropertyName = "properties.keyVaultSecretStatus")] - public KeyVaultSecretStatus? KeyVaultSecretStatus { get; private set; } - - /// - /// Gets or sets resource ID of the associated App Service plan, - /// formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// - [JsonProperty(PropertyName = "properties.serverFarmId")] - public string ServerFarmId { get; set; } - - /// - /// Gets or sets CNAME of the certificate to be issued via free - /// certificate - /// - [JsonProperty(PropertyName = "properties.canonicalName")] - public string CanonicalName { get; set; } - - /// - /// Gets or sets method of domain validation for free cert - /// - [JsonProperty(PropertyName = "properties.domainValidationMethod")] - public string DomainValidationMethod { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateProductType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateProductType.cs deleted file mode 100644 index 218a545ac0ee..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CertificateProductType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CertificateProductType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CertificateProductType - { - [EnumMember(Value = "StandardDomainValidatedSsl")] - StandardDomainValidatedSsl, - [EnumMember(Value = "StandardDomainValidatedWildCardSsl")] - StandardDomainValidatedWildCardSsl - } - internal static class CertificateProductTypeEnumExtension - { - internal static string ToSerializedValue(this CertificateProductType? value) - { - return value == null ? null : ((CertificateProductType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CertificateProductType value) - { - switch( value ) - { - case CertificateProductType.StandardDomainValidatedSsl: - return "StandardDomainValidatedSsl"; - case CertificateProductType.StandardDomainValidatedWildCardSsl: - return "StandardDomainValidatedWildCardSsl"; - } - return null; - } - - internal static CertificateProductType? ParseCertificateProductType(this string value) - { - switch( value ) - { - case "StandardDomainValidatedSsl": - return CertificateProductType.StandardDomainValidatedSsl; - case "StandardDomainValidatedWildCardSsl": - return CertificateProductType.StandardDomainValidatedWildCardSsl; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Channels.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Channels.cs deleted file mode 100644 index 509a07710bdf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Channels.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for Channels. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum Channels - { - [EnumMember(Value = "Notification")] - Notification, - [EnumMember(Value = "Api")] - Api, - [EnumMember(Value = "Email")] - Email, - [EnumMember(Value = "Webhook")] - Webhook, - [EnumMember(Value = "All")] - All - } - internal static class ChannelsEnumExtension - { - internal static string ToSerializedValue(this Channels? value) - { - return value == null ? null : ((Channels)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this Channels value) - { - switch( value ) - { - case Channels.Notification: - return "Notification"; - case Channels.Api: - return "Api"; - case Channels.Email: - return "Email"; - case Channels.Webhook: - return "Webhook"; - case Channels.All: - return "All"; - } - return null; - } - - internal static Channels? ParseChannels(this string value) - { - switch( value ) - { - case "Notification": - return Channels.Notification; - case "Api": - return Channels.Api; - case "Email": - return Channels.Email; - case "Webhook": - return Channels.Webhook; - case "All": - return Channels.All; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CheckNameResourceTypes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CheckNameResourceTypes.cs deleted file mode 100644 index b13b8d8adcc4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CheckNameResourceTypes.cs +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for CheckNameResourceTypes. - /// - public static class CheckNameResourceTypes - { - public const string Site = "Site"; - public const string Slot = "Slot"; - public const string HostingEnvironment = "HostingEnvironment"; - public const string PublishingUser = "PublishingUser"; - public const string MicrosoftWebSites = "Microsoft.Web/sites"; - public const string MicrosoftWebSitesSlots = "Microsoft.Web/sites/slots"; - public const string MicrosoftWebHostingEnvironments = "Microsoft.Web/hostingEnvironments"; - public const string MicrosoftWebPublishingUsers = "Microsoft.Web/publishingUsers"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs deleted file mode 100644 index 5c9bd29f7e2d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCertMode.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ClientCertMode. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ClientCertMode - { - [EnumMember(Value = "Required")] - Required, - [EnumMember(Value = "Optional")] - Optional, - [EnumMember(Value = "OptionalInteractiveUser")] - OptionalInteractiveUser - } - internal static class ClientCertModeEnumExtension - { - internal static string ToSerializedValue(this ClientCertMode? value) - { - return value == null ? null : ((ClientCertMode)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ClientCertMode value) - { - switch( value ) - { - case ClientCertMode.Required: - return "Required"; - case ClientCertMode.Optional: - return "Optional"; - case ClientCertMode.OptionalInteractiveUser: - return "OptionalInteractiveUser"; - } - return null; - } - - internal static ClientCertMode? ParseClientCertMode(this string value) - { - switch( value ) - { - case "Required": - return ClientCertMode.Required; - case "Optional": - return ClientCertMode.Optional; - case "OptionalInteractiveUser": - return ClientCertMode.OptionalInteractiveUser; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCredentialMethod.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCredentialMethod.cs deleted file mode 100644 index 618a5d494cb5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientCredentialMethod.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ClientCredentialMethod. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ClientCredentialMethod - { - [EnumMember(Value = "ClientSecretPost")] - ClientSecretPost - } - internal static class ClientCredentialMethodEnumExtension - { - internal static string ToSerializedValue(this ClientCredentialMethod? value) - { - return value == null ? null : ((ClientCredentialMethod)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ClientCredentialMethod value) - { - switch( value ) - { - case ClientCredentialMethod.ClientSecretPost: - return "ClientSecretPost"; - } - return null; - } - - internal static ClientCredentialMethod? ParseClientCredentialMethod(this string value) - { - switch( value ) - { - case "ClientSecretPost": - return ClientCredentialMethod.ClientSecretPost; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs deleted file mode 100644 index 136b29101b95..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ClientRegistration.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the app registration for providers that - /// have client ids and client secrets - /// - public partial class ClientRegistration - { - /// - /// Initializes a new instance of the ClientRegistration class. - /// - public ClientRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ClientRegistration class. - /// - /// The Client ID of the app used for - /// login. - /// The app setting name that - /// contains the client secret. - public ClientRegistration(string clientId = default(string), string clientSecretSettingName = default(string)) - { - ClientId = clientId; - ClientSecretSettingName = clientSecretSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Client ID of the app used for login. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret. - /// - [JsonProperty(PropertyName = "clientSecretSettingName")] - public string ClientSecretSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloneAbilityResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloneAbilityResult.cs deleted file mode 100644 index 3555d8200dba..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloneAbilityResult.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CloneAbilityResult. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CloneAbilityResult - { - [EnumMember(Value = "Cloneable")] - Cloneable, - [EnumMember(Value = "PartiallyCloneable")] - PartiallyCloneable, - [EnumMember(Value = "NotCloneable")] - NotCloneable - } - internal static class CloneAbilityResultEnumExtension - { - internal static string ToSerializedValue(this CloneAbilityResult? value) - { - return value == null ? null : ((CloneAbilityResult)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CloneAbilityResult value) - { - switch( value ) - { - case CloneAbilityResult.Cloneable: - return "Cloneable"; - case CloneAbilityResult.PartiallyCloneable: - return "PartiallyCloneable"; - case CloneAbilityResult.NotCloneable: - return "NotCloneable"; - } - return null; - } - - internal static CloneAbilityResult? ParseCloneAbilityResult(this string value) - { - switch( value ) - { - case "Cloneable": - return CloneAbilityResult.Cloneable; - case "PartiallyCloneable": - return CloneAbilityResult.PartiallyCloneable; - case "NotCloneable": - return CloneAbilityResult.NotCloneable; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloningInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloningInfo.cs deleted file mode 100644 index 173b4f376d33..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CloningInfo.cs +++ /dev/null @@ -1,190 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Information needed for cloning operation. - /// - public partial class CloningInfo - { - /// - /// Initializes a new instance of the CloningInfo class. - /// - public CloningInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CloningInfo class. - /// - /// ARM resource ID of the source app. App - /// resource ID is of the form - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} - /// for production slots and - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} - /// for other slots. - /// Correlation ID of cloning operation. - /// This ID ties multiple cloning operations - /// together to use the same snapshot. - /// <code>true</code> to overwrite - /// destination app; otherwise, <code>false</code>. - /// <code>true</code> to - /// clone custom hostnames from source app; otherwise, - /// <code>false</code>. - /// <code>true</code> to - /// clone source control from source app; otherwise, - /// <code>false</code>. - /// Location of source app ex: West - /// US or North Europe - /// App Service Environment. - /// Application setting overrides - /// for cloned app. If specified, these settings override the settings - /// cloned - /// from source app. Otherwise, application settings from source app - /// are retained. - /// <code>true</code> - /// to configure load balancing for source and destination app. - /// ARM resource ID of the - /// Traffic Manager profile to use, if it exists. Traffic Manager - /// resource ID is of the form - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. - /// Name of Traffic Manager - /// profile to create. This is only needed if Traffic Manager profile - /// does not already exist. - public CloningInfo(string sourceWebAppId, System.Guid? correlationId = default(System.Guid?), bool? overwrite = default(bool?), bool? cloneCustomHostNames = default(bool?), bool? cloneSourceControl = default(bool?), string sourceWebAppLocation = default(string), string hostingEnvironment = default(string), IDictionary appSettingsOverrides = default(IDictionary), bool? configureLoadBalancing = default(bool?), string trafficManagerProfileId = default(string), string trafficManagerProfileName = default(string)) - { - CorrelationId = correlationId; - Overwrite = overwrite; - CloneCustomHostNames = cloneCustomHostNames; - CloneSourceControl = cloneSourceControl; - SourceWebAppId = sourceWebAppId; - SourceWebAppLocation = sourceWebAppLocation; - HostingEnvironment = hostingEnvironment; - AppSettingsOverrides = appSettingsOverrides; - ConfigureLoadBalancing = configureLoadBalancing; - TrafficManagerProfileId = trafficManagerProfileId; - TrafficManagerProfileName = trafficManagerProfileName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets correlation ID of cloning operation. This ID ties - /// multiple cloning operations - /// together to use the same snapshot. - /// - [JsonProperty(PropertyName = "correlationId")] - public System.Guid? CorrelationId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// overwrite destination app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "overwrite")] - public bool? Overwrite { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to clone - /// custom hostnames from source app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "cloneCustomHostNames")] - public bool? CloneCustomHostNames { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to clone - /// source control from source app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "cloneSourceControl")] - public bool? CloneSourceControl { get; set; } - - /// - /// Gets or sets ARM resource ID of the source app. App resource ID is - /// of the form - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} - /// for production slots and - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} - /// for other slots. - /// - [JsonProperty(PropertyName = "sourceWebAppId")] - public string SourceWebAppId { get; set; } - - /// - /// Gets or sets location of source app ex: West US or North Europe - /// - [JsonProperty(PropertyName = "sourceWebAppLocation")] - public string SourceWebAppLocation { get; set; } - - /// - /// Gets or sets app Service Environment. - /// - [JsonProperty(PropertyName = "hostingEnvironment")] - public string HostingEnvironment { get; set; } - - /// - /// Gets or sets application setting overrides for cloned app. If - /// specified, these settings override the settings cloned - /// from source app. Otherwise, application settings from source app - /// are retained. - /// - [JsonProperty(PropertyName = "appSettingsOverrides")] - public IDictionary AppSettingsOverrides { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// configure load balancing for source and destination app. - /// - [JsonProperty(PropertyName = "configureLoadBalancing")] - public bool? ConfigureLoadBalancing { get; set; } - - /// - /// Gets or sets ARM resource ID of the Traffic Manager profile to use, - /// if it exists. Traffic Manager resource ID is of the form - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}. - /// - [JsonProperty(PropertyName = "trafficManagerProfileId")] - public string TrafficManagerProfileId { get; set; } - - /// - /// Gets or sets name of Traffic Manager profile to create. This is - /// only needed if Traffic Manager profile does not already exist. - /// - [JsonProperty(PropertyName = "trafficManagerProfileName")] - public string TrafficManagerProfileName { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SourceWebAppId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "SourceWebAppId"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ComputeModeOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ComputeModeOptions.cs deleted file mode 100644 index d294d5065e68..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ComputeModeOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ComputeModeOptions. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ComputeModeOptions - { - [EnumMember(Value = "Shared")] - Shared, - [EnumMember(Value = "Dedicated")] - Dedicated, - [EnumMember(Value = "Dynamic")] - Dynamic - } - internal static class ComputeModeOptionsEnumExtension - { - internal static string ToSerializedValue(this ComputeModeOptions? value) - { - return value == null ? null : ((ComputeModeOptions)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ComputeModeOptions value) - { - switch( value ) - { - case ComputeModeOptions.Shared: - return "Shared"; - case ComputeModeOptions.Dedicated: - return "Dedicated"; - case ComputeModeOptions.Dynamic: - return "Dynamic"; - } - return null; - } - - internal static ComputeModeOptions? ParseComputeModeOptions(this string value) - { - switch( value ) - { - case "Shared": - return ComputeModeOptions.Shared; - case "Dedicated": - return ComputeModeOptions.Dedicated; - case "Dynamic": - return ComputeModeOptions.Dynamic; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs deleted file mode 100644 index 621c4362c717..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConfigReferenceSource.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ConfigReferenceSource. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ConfigReferenceSource - { - [EnumMember(Value = "KeyVault")] - KeyVault - } - internal static class ConfigReferenceSourceEnumExtension - { - internal static string ToSerializedValue(this ConfigReferenceSource? value) - { - return value == null ? null : ((ConfigReferenceSource)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ConfigReferenceSource value) - { - switch( value ) - { - case ConfigReferenceSource.KeyVault: - return "KeyVault"; - } - return null; - } - - internal static ConfigReferenceSource? ParseConfigReferenceSource(this string value) - { - switch( value ) - { - case "KeyVault": - return ConfigReferenceSource.KeyVault; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs deleted file mode 100644 index 18e87b06e5e8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Configuration.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Non versioned Container App configuration properties that define the - /// mutable settings of a Container app - /// - public partial class Configuration - { - /// - /// Initializes a new instance of the Configuration class. - /// - public Configuration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Collection of secrets used by a Container - /// app - /// ActiveRevisionsMode controls how - /// active revisions are handled for the Container app: - /// <list><item>Multiple: multiple revisions can be active. - /// If no value if provided, this is the - /// default</item><item>Single: Only one revision can be - /// active at a time. Revision weights can not be used in this - /// mode</item></list>. Possible values include: - /// 'multiple', 'single' - /// Ingress configurations. - /// Collection of private container registry - /// credentials for containers used by the Container app - public Configuration(IList secrets = default(IList), string activeRevisionsMode = default(string), Ingress ingress = default(Ingress), IList registries = default(IList)) - { - Secrets = secrets; - ActiveRevisionsMode = activeRevisionsMode; - Ingress = ingress; - Registries = registries; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets collection of secrets used by a Container app - /// - [JsonProperty(PropertyName = "secrets")] - public IList Secrets { get; set; } - - /// - /// Gets or sets activeRevisionsMode controls how active revisions are - /// handled for the Container app: - /// &lt;list&gt;&lt;item&gt;Multiple: multiple - /// revisions can be active. If no value if provided, this is the - /// default&lt;/item&gt;&lt;item&gt;Single: Only one - /// revision can be active at a time. Revision weights can not be used - /// in this mode&lt;/item&gt;&lt;/list&gt;. Possible - /// values include: 'multiple', 'single' - /// - [JsonProperty(PropertyName = "activeRevisionsMode")] - public string ActiveRevisionsMode { get; set; } - - /// - /// Gets or sets ingress configurations. - /// - [JsonProperty(PropertyName = "ingress")] - public Ingress Ingress { get; set; } - - /// - /// Gets or sets collection of private container registry credentials - /// for containers used by the Container app - /// - [JsonProperty(PropertyName = "registries")] - public IList Registries { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringInfo.cs deleted file mode 100644 index aaf7a07978ca..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringInfo.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Database connection string information. - /// - public partial class ConnStringInfo - { - /// - /// Initializes a new instance of the ConnStringInfo class. - /// - public ConnStringInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnStringInfo class. - /// - /// Name of connection string. - /// Connection string value. - /// Type of database. Possible values include: - /// 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', - /// 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', - /// 'PostgreSQL' - public ConnStringInfo(string name = default(string), string connectionString = default(string), ConnectionStringType? type = default(ConnectionStringType?)) - { - Name = name; - ConnectionString = connectionString; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of connection string. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets connection string value. - /// - [JsonProperty(PropertyName = "connectionString")] - public string ConnectionString { get; set; } - - /// - /// Gets or sets type of database. Possible values include: 'MySql', - /// 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', - /// 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' - /// - [JsonProperty(PropertyName = "type")] - public ConnectionStringType? Type { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringValueTypePair.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringValueTypePair.cs deleted file mode 100644 index 7ea4321cc8c3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnStringValueTypePair.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Database connection string value to type pair. - /// - public partial class ConnStringValueTypePair - { - /// - /// Initializes a new instance of the ConnStringValueTypePair class. - /// - public ConnStringValueTypePair() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnStringValueTypePair class. - /// - /// Value of pair. - /// Type of database. Possible values include: - /// 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', - /// 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', - /// 'PostgreSQL' - public ConnStringValueTypePair(string value, ConnectionStringType type) - { - Value = value; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets value of pair. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Gets or sets type of database. Possible values include: 'MySql', - /// 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', - /// 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' - /// - [JsonProperty(PropertyName = "type")] - public ConnectionStringType Type { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Value == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Value"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringDictionary.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringDictionary.cs deleted file mode 100644 index 2211f6ff3636..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringDictionary.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// String dictionary resource. - /// - public partial class ConnectionStringDictionary : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ConnectionStringDictionary class. - /// - public ConnectionStringDictionary() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ConnectionStringDictionary class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Connection strings. - public ConnectionStringDictionary(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary properties = default(IDictionary)) - : base(id, name, kind, type) - { - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets connection strings. - /// - [JsonProperty(PropertyName = "properties")] - public IDictionary Properties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringType.cs deleted file mode 100644 index 5e79b9550271..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ConnectionStringType.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ConnectionStringType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ConnectionStringType - { - [EnumMember(Value = "MySql")] - MySql, - [EnumMember(Value = "SQLServer")] - SQLServer, - [EnumMember(Value = "SQLAzure")] - SQLAzure, - [EnumMember(Value = "Custom")] - Custom, - [EnumMember(Value = "NotificationHub")] - NotificationHub, - [EnumMember(Value = "ServiceBus")] - ServiceBus, - [EnumMember(Value = "EventHub")] - EventHub, - [EnumMember(Value = "ApiHub")] - ApiHub, - [EnumMember(Value = "DocDb")] - DocDb, - [EnumMember(Value = "RedisCache")] - RedisCache, - [EnumMember(Value = "PostgreSQL")] - PostgreSQL - } - internal static class ConnectionStringTypeEnumExtension - { - internal static string ToSerializedValue(this ConnectionStringType? value) - { - return value == null ? null : ((ConnectionStringType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ConnectionStringType value) - { - switch( value ) - { - case ConnectionStringType.MySql: - return "MySql"; - case ConnectionStringType.SQLServer: - return "SQLServer"; - case ConnectionStringType.SQLAzure: - return "SQLAzure"; - case ConnectionStringType.Custom: - return "Custom"; - case ConnectionStringType.NotificationHub: - return "NotificationHub"; - case ConnectionStringType.ServiceBus: - return "ServiceBus"; - case ConnectionStringType.EventHub: - return "EventHub"; - case ConnectionStringType.ApiHub: - return "ApiHub"; - case ConnectionStringType.DocDb: - return "DocDb"; - case ConnectionStringType.RedisCache: - return "RedisCache"; - case ConnectionStringType.PostgreSQL: - return "PostgreSQL"; - } - return null; - } - - internal static ConnectionStringType? ParseConnectionStringType(this string value) - { - switch( value ) - { - case "MySql": - return ConnectionStringType.MySql; - case "SQLServer": - return ConnectionStringType.SQLServer; - case "SQLAzure": - return ConnectionStringType.SQLAzure; - case "Custom": - return ConnectionStringType.Custom; - case "NotificationHub": - return ConnectionStringType.NotificationHub; - case "ServiceBus": - return ConnectionStringType.ServiceBus; - case "EventHub": - return ConnectionStringType.EventHub; - case "ApiHub": - return ConnectionStringType.ApiHub; - case "DocDb": - return ConnectionStringType.DocDb; - case "RedisCache": - return ConnectionStringType.RedisCache; - case "PostgreSQL": - return ConnectionStringType.PostgreSQL; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Contact.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Contact.cs deleted file mode 100644 index 89b6c43702b3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Contact.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Contact information for domain registration. If 'Domain Privacy' option - /// is not selected then the contact information is made publicly available - /// through the Whois - /// directories as per ICANN requirements. - /// - public partial class Contact - { - /// - /// Initializes a new instance of the Contact class. - /// - public Contact() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Contact class. - /// - /// Email address. - /// First name. - /// Last name. - /// Phone number. - /// Mailing address. - /// Fax number. - /// Job title. - /// Middle name. - /// Organization contact belongs to. - public Contact(string email, string nameFirst, string nameLast, string phone, Address addressMailing = default(Address), string fax = default(string), string jobTitle = default(string), string nameMiddle = default(string), string organization = default(string)) - { - AddressMailing = addressMailing; - Email = email; - Fax = fax; - JobTitle = jobTitle; - NameFirst = nameFirst; - NameLast = nameLast; - NameMiddle = nameMiddle; - Organization = organization; - Phone = phone; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets mailing address. - /// - [JsonProperty(PropertyName = "addressMailing")] - public Address AddressMailing { get; set; } - - /// - /// Gets or sets email address. - /// - [JsonProperty(PropertyName = "email")] - public string Email { get; set; } - - /// - /// Gets or sets fax number. - /// - [JsonProperty(PropertyName = "fax")] - public string Fax { get; set; } - - /// - /// Gets or sets job title. - /// - [JsonProperty(PropertyName = "jobTitle")] - public string JobTitle { get; set; } - - /// - /// Gets or sets first name. - /// - [JsonProperty(PropertyName = "nameFirst")] - public string NameFirst { get; set; } - - /// - /// Gets or sets last name. - /// - [JsonProperty(PropertyName = "nameLast")] - public string NameLast { get; set; } - - /// - /// Gets or sets middle name. - /// - [JsonProperty(PropertyName = "nameMiddle")] - public string NameMiddle { get; set; } - - /// - /// Gets or sets organization contact belongs to. - /// - [JsonProperty(PropertyName = "organization")] - public string Organization { get; set; } - - /// - /// Gets or sets phone number. - /// - [JsonProperty(PropertyName = "phone")] - public string Phone { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Email == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Email"); - } - if (NameFirst == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "NameFirst"); - } - if (NameLast == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "NameLast"); - } - if (Phone == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Phone"); - } - if (AddressMailing != null) - { - AddressMailing.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs deleted file mode 100644 index 97d7641d3cae..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Container.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App container definition. - /// - public partial class Container - { - /// - /// Initializes a new instance of the Container class. - /// - public Container() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Container class. - /// - /// Container image tag. - /// Custom container name. - /// Container start command. - /// Container start command arguments. - /// Container environment variables. - /// Container resource requirements. - public Container(string image = default(string), string name = default(string), IList command = default(IList), IList args = default(IList), IList env = default(IList), ContainerResources resources = default(ContainerResources)) - { - Image = image; - Name = name; - Command = command; - Args = args; - Env = env; - Resources = resources; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets container image tag. - /// - [JsonProperty(PropertyName = "image")] - public string Image { get; set; } - - /// - /// Gets or sets custom container name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets container start command. - /// - [JsonProperty(PropertyName = "command")] - public IList Command { get; set; } - - /// - /// Gets or sets container start command arguments. - /// - [JsonProperty(PropertyName = "args")] - public IList Args { get; set; } - - /// - /// Gets or sets container environment variables. - /// - [JsonProperty(PropertyName = "env")] - public IList Env { get; set; } - - /// - /// Gets or sets container resource requirements. - /// - [JsonProperty(PropertyName = "resources")] - public ContainerResources Resources { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs deleted file mode 100644 index 4a623248f69c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerApp.cs +++ /dev/null @@ -1,122 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App. - /// - [Rest.Serialization.JsonTransformation] - public partial class ContainerApp : Resource - { - /// - /// Initializes a new instance of the ContainerApp class. - /// - public ContainerApp() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerApp class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Provisioning state of the Container - /// App. Possible values include: 'InProgress', 'Succeeded', 'Failed', - /// 'Canceled' - /// Resource ID of the Container App's - /// KubeEnvironment. - /// Name of the latest revision of the - /// Container App. - /// Fully Qualified Domain Name of the - /// latest revision of the Container App. - /// Non versioned Container App - /// configuration properties. - /// Container App versioned application - /// definition. - public ContainerApp(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string provisioningState = default(string), string kubeEnvironmentId = default(string), string latestRevisionName = default(string), string latestRevisionFqdn = default(string), Configuration configuration = default(Configuration), Template template = default(Template)) - : base(location, id, name, kind, type, tags) - { - ProvisioningState = provisioningState; - KubeEnvironmentId = kubeEnvironmentId; - LatestRevisionName = latestRevisionName; - LatestRevisionFqdn = latestRevisionFqdn; - Configuration = configuration; - Template = template; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the Container App. Possible values - /// include: 'InProgress', 'Succeeded', 'Failed', 'Canceled' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets resource ID of the Container App's KubeEnvironment. - /// - [JsonProperty(PropertyName = "properties.kubeEnvironmentId")] - public string KubeEnvironmentId { get; set; } - - /// - /// Gets name of the latest revision of the Container App. - /// - [JsonProperty(PropertyName = "properties.latestRevisionName")] - public string LatestRevisionName { get; private set; } - - /// - /// Gets fully Qualified Domain Name of the latest revision of the - /// Container App. - /// - [JsonProperty(PropertyName = "properties.latestRevisionFqdn")] - public string LatestRevisionFqdn { get; private set; } - - /// - /// Gets or sets non versioned Container App configuration properties. - /// - [JsonProperty(PropertyName = "properties.configuration")] - public Configuration Configuration { get; set; } - - /// - /// Gets or sets container App versioned application definition. - /// - [JsonProperty(PropertyName = "properties.template")] - public Template Template { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs deleted file mode 100644 index e660bcd4f0a0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppProvisioningState.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for ContainerAppProvisioningState. - /// - public static class ContainerAppProvisioningState - { - public const string InProgress = "InProgress"; - public const string Succeeded = "Succeeded"; - public const string Failed = "Failed"; - public const string Canceled = "Canceled"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs deleted file mode 100644 index d32a26a99e63..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppSecret.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App Secret. - /// - public partial class ContainerAppSecret - { - /// - /// Initializes a new instance of the ContainerAppSecret class. - /// - public ContainerAppSecret() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerAppSecret class. - /// - /// Secret Name. - /// Secret Value. - public ContainerAppSecret(string name = default(string), string value = default(string)) - { - Name = name; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets secret Name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets secret Value. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs deleted file mode 100644 index 2742ff26f47a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerAppsConfiguration.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerAppsConfiguration - { - /// - /// Initializes a new instance of the ContainerAppsConfiguration class. - /// - public ContainerAppsConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerAppsConfiguration class. - /// - /// Azure Monitor - /// instrumentation key used by Dapr to export Service to Service - /// communication telemetry - /// IP range in CIDR notation that - /// can be reserved for environment infrastructure IP addresses. It - /// must not overlap with any other Subnet IP ranges. - /// An IP address from the IP range - /// defined by platformReservedCidr that will be reserved for the - /// internal DNS server - /// Resource ID of a subnet - /// for control plane infrastructure components. This subnet must be in - /// the same VNET as the subnet defined in appSubnetResourceId. Must - /// not overlap with the IP range defined in platformReservedCidr, if - /// defined. - /// Resource ID of a subnet for - /// control plane infrastructure components. This subnet must be in the - /// same VNET as the subnet defined in appSubnetResourceId. Must not - /// overlap with the IP range defined in platformReservedCidr, if - /// defined. - /// CIDR notation IP range assigned to - /// the Docker bridge network. It must not overlap with any Subnet IP - /// ranges or the IP range defined in platformReservedCidr, if - /// defined. - public ContainerAppsConfiguration(string daprAIInstrumentationKey = default(string), string platformReservedCidr = default(string), string platformReservedDnsIP = default(string), string controlPlaneSubnetResourceId = default(string), string appSubnetResourceId = default(string), string dockerBridgeCidr = default(string)) - { - DaprAIInstrumentationKey = daprAIInstrumentationKey; - PlatformReservedCidr = platformReservedCidr; - PlatformReservedDnsIP = platformReservedDnsIP; - ControlPlaneSubnetResourceId = controlPlaneSubnetResourceId; - AppSubnetResourceId = appSubnetResourceId; - DockerBridgeCidr = dockerBridgeCidr; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets azure Monitor instrumentation key used by Dapr to - /// export Service to Service communication telemetry - /// - [JsonProperty(PropertyName = "daprAIInstrumentationKey")] - public string DaprAIInstrumentationKey { get; set; } - - /// - /// Gets or sets IP range in CIDR notation that can be reserved for - /// environment infrastructure IP addresses. It must not overlap with - /// any other Subnet IP ranges. - /// - [JsonProperty(PropertyName = "platformReservedCidr")] - public string PlatformReservedCidr { get; set; } - - /// - /// Gets or sets an IP address from the IP range defined by - /// platformReservedCidr that will be reserved for the internal DNS - /// server - /// - [JsonProperty(PropertyName = "platformReservedDnsIP")] - public string PlatformReservedDnsIP { get; set; } - - /// - /// Gets or sets resource ID of a subnet for control plane - /// infrastructure components. This subnet must be in the same VNET as - /// the subnet defined in appSubnetResourceId. Must not overlap with - /// the IP range defined in platformReservedCidr, if defined. - /// - [JsonProperty(PropertyName = "controlPlaneSubnetResourceId")] - public string ControlPlaneSubnetResourceId { get; set; } - - /// - /// Gets or sets resource ID of a subnet for control plane - /// infrastructure components. This subnet must be in the same VNET as - /// the subnet defined in appSubnetResourceId. Must not overlap with - /// the IP range defined in platformReservedCidr, if defined. - /// - [JsonProperty(PropertyName = "appSubnetResourceId")] - public string AppSubnetResourceId { get; set; } - - /// - /// Gets or sets CIDR notation IP range assigned to the Docker bridge - /// network. It must not overlap with any Subnet IP ranges or the IP - /// range defined in platformReservedCidr, if defined. - /// - [JsonProperty(PropertyName = "dockerBridgeCidr")] - public string DockerBridgeCidr { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuStatistics.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuStatistics.cs deleted file mode 100644 index fef297e782d1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuStatistics.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerCpuStatistics - { - /// - /// Initializes a new instance of the ContainerCpuStatistics class. - /// - public ContainerCpuStatistics() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerCpuStatistics class. - /// - public ContainerCpuStatistics(ContainerCpuUsage cpuUsage = default(ContainerCpuUsage), long? systemCpuUsage = default(long?), int? onlineCpuCount = default(int?), ContainerThrottlingData throttlingData = default(ContainerThrottlingData)) - { - CpuUsage = cpuUsage; - SystemCpuUsage = systemCpuUsage; - OnlineCpuCount = onlineCpuCount; - ThrottlingData = throttlingData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "cpuUsage")] - public ContainerCpuUsage CpuUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "systemCpuUsage")] - public long? SystemCpuUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "onlineCpuCount")] - public int? OnlineCpuCount { get; set; } - - /// - /// - [JsonProperty(PropertyName = "throttlingData")] - public ContainerThrottlingData ThrottlingData { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuUsage.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuUsage.cs deleted file mode 100644 index b0d93c37d24d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerCpuUsage.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - public partial class ContainerCpuUsage - { - /// - /// Initializes a new instance of the ContainerCpuUsage class. - /// - public ContainerCpuUsage() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerCpuUsage class. - /// - public ContainerCpuUsage(long? totalUsage = default(long?), IList perCpuUsage = default(IList), long? kernelModeUsage = default(long?), long? userModeUsage = default(long?)) - { - TotalUsage = totalUsage; - PerCpuUsage = perCpuUsage; - KernelModeUsage = kernelModeUsage; - UserModeUsage = userModeUsage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "totalUsage")] - public long? TotalUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "perCpuUsage")] - public IList PerCpuUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "kernelModeUsage")] - public long? KernelModeUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "userModeUsage")] - public long? UserModeUsage { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerInfo.cs deleted file mode 100644 index 0eecbf3b3654..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerInfo.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerInfo - { - /// - /// Initializes a new instance of the ContainerInfo class. - /// - public ContainerInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerInfo class. - /// - public ContainerInfo(System.DateTime? currentTimeStamp = default(System.DateTime?), System.DateTime? previousTimeStamp = default(System.DateTime?), ContainerCpuStatistics currentCpuStats = default(ContainerCpuStatistics), ContainerCpuStatistics previousCpuStats = default(ContainerCpuStatistics), ContainerMemoryStatistics memoryStats = default(ContainerMemoryStatistics), string name = default(string), string id = default(string), ContainerNetworkInterfaceStatistics eth0 = default(ContainerNetworkInterfaceStatistics)) - { - CurrentTimeStamp = currentTimeStamp; - PreviousTimeStamp = previousTimeStamp; - CurrentCpuStats = currentCpuStats; - PreviousCpuStats = previousCpuStats; - MemoryStats = memoryStats; - Name = name; - Id = id; - Eth0 = eth0; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "currentTimeStamp")] - public System.DateTime? CurrentTimeStamp { get; set; } - - /// - /// - [JsonProperty(PropertyName = "previousTimeStamp")] - public System.DateTime? PreviousTimeStamp { get; set; } - - /// - /// - [JsonProperty(PropertyName = "currentCpuStats")] - public ContainerCpuStatistics CurrentCpuStats { get; set; } - - /// - /// - [JsonProperty(PropertyName = "previousCpuStats")] - public ContainerCpuStatistics PreviousCpuStats { get; set; } - - /// - /// - [JsonProperty(PropertyName = "memoryStats")] - public ContainerMemoryStatistics MemoryStats { get; set; } - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// - [JsonProperty(PropertyName = "eth0")] - public ContainerNetworkInterfaceStatistics Eth0 { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerMemoryStatistics.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerMemoryStatistics.cs deleted file mode 100644 index ac4bc9cbfc83..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerMemoryStatistics.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerMemoryStatistics - { - /// - /// Initializes a new instance of the ContainerMemoryStatistics class. - /// - public ContainerMemoryStatistics() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerMemoryStatistics class. - /// - public ContainerMemoryStatistics(long? usage = default(long?), long? maxUsage = default(long?), long? limit = default(long?)) - { - Usage = usage; - MaxUsage = maxUsage; - Limit = limit; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "usage")] - public long? Usage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "maxUsage")] - public long? MaxUsage { get; set; } - - /// - /// - [JsonProperty(PropertyName = "limit")] - public long? Limit { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerNetworkInterfaceStatistics.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerNetworkInterfaceStatistics.cs deleted file mode 100644 index f2a7bdfdb180..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerNetworkInterfaceStatistics.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerNetworkInterfaceStatistics - { - /// - /// Initializes a new instance of the - /// ContainerNetworkInterfaceStatistics class. - /// - public ContainerNetworkInterfaceStatistics() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ContainerNetworkInterfaceStatistics class. - /// - public ContainerNetworkInterfaceStatistics(long? rxBytes = default(long?), long? rxPackets = default(long?), long? rxErrors = default(long?), long? rxDropped = default(long?), long? txBytes = default(long?), long? txPackets = default(long?), long? txErrors = default(long?), long? txDropped = default(long?)) - { - RxBytes = rxBytes; - RxPackets = rxPackets; - RxErrors = rxErrors; - RxDropped = rxDropped; - TxBytes = txBytes; - TxPackets = txPackets; - TxErrors = txErrors; - TxDropped = txDropped; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "rxBytes")] - public long? RxBytes { get; set; } - - /// - /// - [JsonProperty(PropertyName = "rxPackets")] - public long? RxPackets { get; set; } - - /// - /// - [JsonProperty(PropertyName = "rxErrors")] - public long? RxErrors { get; set; } - - /// - /// - [JsonProperty(PropertyName = "rxDropped")] - public long? RxDropped { get; set; } - - /// - /// - [JsonProperty(PropertyName = "txBytes")] - public long? TxBytes { get; set; } - - /// - /// - [JsonProperty(PropertyName = "txPackets")] - public long? TxPackets { get; set; } - - /// - /// - [JsonProperty(PropertyName = "txErrors")] - public long? TxErrors { get; set; } - - /// - /// - [JsonProperty(PropertyName = "txDropped")] - public long? TxDropped { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs deleted file mode 100644 index 6385c6b328c4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerResources.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App container resource requirements. - /// - public partial class ContainerResources - { - /// - /// Initializes a new instance of the ContainerResources class. - /// - public ContainerResources() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerResources class. - /// - /// Required CPU in cores, e.g. 0.5 - /// Required memory, e.g. "250Mb" - public ContainerResources(double? cpu = default(double?), string memory = default(string)) - { - Cpu = cpu; - Memory = memory; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets required CPU in cores, e.g. 0.5 - /// - [JsonProperty(PropertyName = "cpu")] - public double? Cpu { get; set; } - - /// - /// Gets or sets required memory, e.g. "250Mb" - /// - [JsonProperty(PropertyName = "memory")] - public string Memory { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerThrottlingData.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerThrottlingData.cs deleted file mode 100644 index 286d2ae0c717..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContainerThrottlingData.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ContainerThrottlingData - { - /// - /// Initializes a new instance of the ContainerThrottlingData class. - /// - public ContainerThrottlingData() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContainerThrottlingData class. - /// - public ContainerThrottlingData(int? periods = default(int?), int? throttledPeriods = default(int?), int? throttledTime = default(int?)) - { - Periods = periods; - ThrottledPeriods = throttledPeriods; - ThrottledTime = throttledTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "periods")] - public int? Periods { get; set; } - - /// - /// - [JsonProperty(PropertyName = "throttledPeriods")] - public int? ThrottledPeriods { get; set; } - - /// - /// - [JsonProperty(PropertyName = "throttledTime")] - public int? ThrottledTime { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJob.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJob.cs deleted file mode 100644 index f8139a745481..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJob.cs +++ /dev/null @@ -1,138 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Continuous Web Job Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class ContinuousWebJob : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ContinuousWebJob class. - /// - public ContinuousWebJob() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ContinuousWebJob class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Job status. Possible values include: - /// 'Initializing', 'Starting', 'Running', 'PendingRestart', - /// 'Stopped' - /// Detailed status. - /// Log URL. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. Possible values include: - /// 'Continuous', 'Triggered' - /// Error information. - /// Using SDK? - /// Job settings. - public ContinuousWebJob(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ContinuousWebJobStatus? status = default(ContinuousWebJobStatus?), string detailedStatus = default(string), string logUrl = default(string), string runCommand = default(string), string url = default(string), string extraInfoUrl = default(string), WebJobType? webJobType = default(WebJobType?), string error = default(string), bool? usingSdk = default(bool?), IDictionary settings = default(IDictionary)) - : base(id, name, kind, type) - { - Status = status; - DetailedStatus = detailedStatus; - LogUrl = logUrl; - RunCommand = runCommand; - Url = url; - ExtraInfoUrl = extraInfoUrl; - WebJobType = webJobType; - Error = error; - UsingSdk = usingSdk; - Settings = settings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets job status. Possible values include: 'Initializing', - /// 'Starting', 'Running', 'PendingRestart', 'Stopped' - /// - [JsonProperty(PropertyName = "properties.status")] - public ContinuousWebJobStatus? Status { get; set; } - - /// - /// Gets or sets detailed status. - /// - [JsonProperty(PropertyName = "properties.detailed_status")] - public string DetailedStatus { get; set; } - - /// - /// Gets or sets log URL. - /// - [JsonProperty(PropertyName = "properties.log_url")] - public string LogUrl { get; set; } - - /// - /// Gets or sets run command. - /// - [JsonProperty(PropertyName = "properties.run_command")] - public string RunCommand { get; set; } - - /// - /// Gets or sets job URL. - /// - [JsonProperty(PropertyName = "properties.url")] - public string Url { get; set; } - - /// - /// Gets or sets extra Info URL. - /// - [JsonProperty(PropertyName = "properties.extra_info_url")] - public string ExtraInfoUrl { get; set; } - - /// - /// Gets or sets job type. Possible values include: 'Continuous', - /// 'Triggered' - /// - [JsonProperty(PropertyName = "properties.web_job_type")] - public WebJobType? WebJobType { get; set; } - - /// - /// Gets or sets error information. - /// - [JsonProperty(PropertyName = "properties.error")] - public string Error { get; set; } - - /// - /// Gets or sets using SDK? - /// - [JsonProperty(PropertyName = "properties.using_sdk")] - public bool? UsingSdk { get; set; } - - /// - /// Gets or sets job settings. - /// - [JsonProperty(PropertyName = "properties.settings")] - public IDictionary Settings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJobStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJobStatus.cs deleted file mode 100644 index 4ee338d1cd45..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ContinuousWebJobStatus.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ContinuousWebJobStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ContinuousWebJobStatus - { - [EnumMember(Value = "Initializing")] - Initializing, - [EnumMember(Value = "Starting")] - Starting, - [EnumMember(Value = "Running")] - Running, - [EnumMember(Value = "PendingRestart")] - PendingRestart, - [EnumMember(Value = "Stopped")] - Stopped - } - internal static class ContinuousWebJobStatusEnumExtension - { - internal static string ToSerializedValue(this ContinuousWebJobStatus? value) - { - return value == null ? null : ((ContinuousWebJobStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ContinuousWebJobStatus value) - { - switch( value ) - { - case ContinuousWebJobStatus.Initializing: - return "Initializing"; - case ContinuousWebJobStatus.Starting: - return "Starting"; - case ContinuousWebJobStatus.Running: - return "Running"; - case ContinuousWebJobStatus.PendingRestart: - return "PendingRestart"; - case ContinuousWebJobStatus.Stopped: - return "Stopped"; - } - return null; - } - - internal static ContinuousWebJobStatus? ParseContinuousWebJobStatus(this string value) - { - switch( value ) - { - case "Initializing": - return ContinuousWebJobStatus.Initializing; - case "Starting": - return ContinuousWebJobStatus.Starting; - case "Running": - return ContinuousWebJobStatus.Running; - case "PendingRestart": - return ContinuousWebJobStatus.PendingRestart; - case "Stopped": - return ContinuousWebJobStatus.Stopped; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs deleted file mode 100644 index 89a992a8f4d5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpiration.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the session cookie's expiration. - /// - public partial class CookieExpiration - { - /// - /// Initializes a new instance of the CookieExpiration class. - /// - public CookieExpiration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CookieExpiration class. - /// - /// The convention used when determining the - /// session cookie's expiration. Possible values include: 'FixedTime', - /// 'IdentityProviderDerived' - /// The time after the request is made - /// when the session cookie should expire. - public CookieExpiration(CookieExpirationConvention? convention = default(CookieExpirationConvention?), string timeToExpiration = default(string)) - { - Convention = convention; - TimeToExpiration = timeToExpiration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the convention used when determining the session - /// cookie's expiration. Possible values include: 'FixedTime', - /// 'IdentityProviderDerived' - /// - [JsonProperty(PropertyName = "convention")] - public CookieExpirationConvention? Convention { get; set; } - - /// - /// Gets or sets the time after the request is made when the session - /// cookie should expire. - /// - [JsonProperty(PropertyName = "timeToExpiration")] - public string TimeToExpiration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpirationConvention.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpirationConvention.cs deleted file mode 100644 index f70cd921b20d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CookieExpirationConvention.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CookieExpirationConvention. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CookieExpirationConvention - { - [EnumMember(Value = "FixedTime")] - FixedTime, - [EnumMember(Value = "IdentityProviderDerived")] - IdentityProviderDerived - } - internal static class CookieExpirationConventionEnumExtension - { - internal static string ToSerializedValue(this CookieExpirationConvention? value) - { - return value == null ? null : ((CookieExpirationConvention)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CookieExpirationConvention value) - { - switch( value ) - { - case CookieExpirationConvention.FixedTime: - return "FixedTime"; - case CookieExpirationConvention.IdentityProviderDerived: - return "IdentityProviderDerived"; - } - return null; - } - - internal static CookieExpirationConvention? ParseCookieExpirationConvention(this string value) - { - switch( value ) - { - case "FixedTime": - return CookieExpirationConvention.FixedTime; - case "IdentityProviderDerived": - return CookieExpirationConvention.IdentityProviderDerived; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CorsSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CorsSettings.cs deleted file mode 100644 index 30cffd37b2a1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CorsSettings.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Cross-Origin Resource Sharing (CORS) settings for the app. - /// - public partial class CorsSettings - { - /// - /// Initializes a new instance of the CorsSettings class. - /// - public CorsSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CorsSettings class. - /// - /// Gets or sets the list of origins that - /// should be allowed to make cross-origin - /// calls (for example: http://example.com:12345). Use "*" to allow - /// all. - /// Gets or sets whether CORS requests - /// with credentials are allowed. See - /// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials - /// for more details. - public CorsSettings(IList allowedOrigins = default(IList), bool? supportCredentials = default(bool?)) - { - AllowedOrigins = allowedOrigins; - SupportCredentials = supportCredentials; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of origins that should be allowed to make - /// cross-origin - /// calls (for example: http://example.com:12345). Use "*" to allow - /// all. - /// - [JsonProperty(PropertyName = "allowedOrigins")] - public IList AllowedOrigins { get; set; } - - /// - /// Gets or sets whether CORS requests with credentials are allowed. - /// See - /// https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials - /// for more details. - /// - [JsonProperty(PropertyName = "supportCredentials")] - public bool? SupportCredentials { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmMoveResourceEnvelope.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmMoveResourceEnvelope.cs deleted file mode 100644 index 221891f818a8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmMoveResourceEnvelope.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Object with a list of the resources that need to be moved and the - /// resource group they should be moved to. - /// - public partial class CsmMoveResourceEnvelope - { - /// - /// Initializes a new instance of the CsmMoveResourceEnvelope class. - /// - public CsmMoveResourceEnvelope() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmMoveResourceEnvelope class. - /// - public CsmMoveResourceEnvelope(string targetResourceGroup = default(string), IList resources = default(IList)) - { - TargetResourceGroup = targetResourceGroup; - Resources = resources; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "targetResourceGroup")] - public string TargetResourceGroup { get; set; } - - /// - /// - [JsonProperty(PropertyName = "resources")] - public IList Resources { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TargetResourceGroup != null) - { - if (TargetResourceGroup.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "TargetResourceGroup", 90); - } - if (TargetResourceGroup.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "TargetResourceGroup", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(TargetResourceGroup, " ^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "TargetResourceGroup", " ^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs deleted file mode 100644 index 52de32488e8f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescription.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description of an operation available for Microsoft.Web resource - /// provider. - /// - public partial class CsmOperationDescription - { - /// - /// Initializes a new instance of the CsmOperationDescription class. - /// - public CsmOperationDescription() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmOperationDescription class. - /// - public CsmOperationDescription(string name = default(string), bool? isDataAction = default(bool?), CsmOperationDisplay display = default(CsmOperationDisplay), string origin = default(string), CsmOperationDescriptionProperties properties = default(CsmOperationDescriptionProperties)) - { - Name = name; - IsDataAction = isDataAction; - Display = display; - Origin = origin; - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "isDataAction")] - public bool? IsDataAction { get; set; } - - /// - /// - [JsonProperty(PropertyName = "display")] - public CsmOperationDisplay Display { get; set; } - - /// - /// - [JsonProperty(PropertyName = "origin")] - public string Origin { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties")] - public CsmOperationDescriptionProperties Properties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescriptionProperties.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescriptionProperties.cs deleted file mode 100644 index 2c2db9daf03d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDescriptionProperties.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Properties available for a Microsoft.Web resource provider operation. - /// - public partial class CsmOperationDescriptionProperties - { - /// - /// Initializes a new instance of the CsmOperationDescriptionProperties - /// class. - /// - public CsmOperationDescriptionProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmOperationDescriptionProperties - /// class. - /// - public CsmOperationDescriptionProperties(ServiceSpecification serviceSpecification = default(ServiceSpecification)) - { - ServiceSpecification = serviceSpecification; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "serviceSpecification")] - public ServiceSpecification ServiceSpecification { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDisplay.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDisplay.cs deleted file mode 100644 index e22e286ff398..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmOperationDisplay.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Meta data about operation used for display in portal. - /// - public partial class CsmOperationDisplay - { - /// - /// Initializes a new instance of the CsmOperationDisplay class. - /// - public CsmOperationDisplay() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmOperationDisplay class. - /// - public CsmOperationDisplay(string provider = default(string), string resource = default(string), string operation = default(string), string description = default(string)) - { - Provider = provider; - Resource = resource; - Operation = operation; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "provider")] - public string Provider { get; set; } - - /// - /// - [JsonProperty(PropertyName = "resource")] - public string Resource { get; set; } - - /// - /// - [JsonProperty(PropertyName = "operation")] - public string Operation { get; set; } - - /// - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesEntity.cs deleted file mode 100644 index 3b389e6e76fa..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingCredentialsPoliciesEntity.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Publishing Credentials Policies parameters. - /// - [Rest.Serialization.JsonTransformation] - public partial class CsmPublishingCredentialsPoliciesEntity : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// CsmPublishingCredentialsPoliciesEntity class. - /// - public CsmPublishingCredentialsPoliciesEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// CsmPublishingCredentialsPoliciesEntity class. - /// - /// <code>true</code> to allow access - /// to a publishing method; otherwise, - /// <code>false</code>. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public CsmPublishingCredentialsPoliciesEntity(bool allow, string id = default(string), string name = default(string), string kind = default(string), string type = default(string)) - : base(id, name, kind, type) - { - Allow = allow; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to allow - /// access to a publishing method; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.allow")] - public bool Allow { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingProfileOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingProfileOptions.cs deleted file mode 100644 index ab77ff58b750..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmPublishingProfileOptions.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Publishing options for requested profile. - /// - public partial class CsmPublishingProfileOptions - { - /// - /// Initializes a new instance of the CsmPublishingProfileOptions - /// class. - /// - public CsmPublishingProfileOptions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmPublishingProfileOptions - /// class. - /// - /// Name of the format. Valid values are: - /// FileZilla3 - /// WebDeploy -- default - /// Ftp. Possible values include: 'FileZilla3', 'WebDeploy', - /// 'Ftp' - /// Include the - /// DisasterRecover endpoint if true - public CsmPublishingProfileOptions(string format = default(string), bool? includeDisasterRecoveryEndpoints = default(bool?)) - { - Format = format; - IncludeDisasterRecoveryEndpoints = includeDisasterRecoveryEndpoints; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the format. Valid values are: - /// FileZilla3 - /// WebDeploy -- default - /// Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' - /// - [JsonProperty(PropertyName = "format")] - public string Format { get; set; } - - /// - /// Gets or sets include the DisasterRecover endpoint if true - /// - [JsonProperty(PropertyName = "includeDisasterRecoveryEndpoints")] - public bool? IncludeDisasterRecoveryEndpoints { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmSlotEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmSlotEntity.cs deleted file mode 100644 index ab57d287cfc7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmSlotEntity.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Deployment slot parameters. - /// - public partial class CsmSlotEntity - { - /// - /// Initializes a new instance of the CsmSlotEntity class. - /// - public CsmSlotEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmSlotEntity class. - /// - /// Destination deployment slot during swap - /// operation. - /// <code>true</code> to - /// preserve Virtual Network to the slot during swap; otherwise, - /// <code>false</code>. - public CsmSlotEntity(string targetSlot, bool preserveVnet) - { - TargetSlot = targetSlot; - PreserveVnet = preserveVnet; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets destination deployment slot during swap operation. - /// - [JsonProperty(PropertyName = "targetSlot")] - public string TargetSlot { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// preserve Virtual Network to the slot during swap; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "preserveVnet")] - public bool PreserveVnet { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (TargetSlot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "TargetSlot"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmUsageQuota.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmUsageQuota.cs deleted file mode 100644 index 8ebed8720d9e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CsmUsageQuota.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Usage of the quota resource. - /// - public partial class CsmUsageQuota - { - /// - /// Initializes a new instance of the CsmUsageQuota class. - /// - public CsmUsageQuota() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CsmUsageQuota class. - /// - /// Units of measurement for the quota - /// resource. - /// Next reset time for the resource - /// counter. - /// The current value of the resource - /// counter. - /// The resource limit. - /// Quota name. - public CsmUsageQuota(string unit = default(string), System.DateTime? nextResetTime = default(System.DateTime?), long? currentValue = default(long?), long? limit = default(long?), LocalizableString name = default(LocalizableString)) - { - Unit = unit; - NextResetTime = nextResetTime; - CurrentValue = currentValue; - Limit = limit; - Name = name; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets units of measurement for the quota resource. - /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } - - /// - /// Gets or sets next reset time for the resource counter. - /// - [JsonProperty(PropertyName = "nextResetTime")] - public System.DateTime? NextResetTime { get; set; } - - /// - /// Gets or sets the current value of the resource counter. - /// - [JsonProperty(PropertyName = "currentValue")] - public long? CurrentValue { get; set; } - - /// - /// Gets or sets the resource limit. - /// - [JsonProperty(PropertyName = "limit")] - public long? Limit { get; set; } - - /// - /// Gets or sets quota name. - /// - [JsonProperty(PropertyName = "name")] - public LocalizableString Name { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs deleted file mode 100644 index 7a18aa9698bf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomDomainStatus.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for CustomDomainStatus. - /// - public static class CustomDomainStatus - { - public const string RetrievingValidationToken = "RetrievingValidationToken"; - public const string Validating = "Validating"; - public const string Adding = "Adding"; - public const string Ready = "Ready"; - public const string Failed = "Failed"; - public const string Deleting = "Deleting"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostNameDnsRecordType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostNameDnsRecordType.cs deleted file mode 100644 index 9226829dbeae..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostNameDnsRecordType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for CustomHostNameDnsRecordType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CustomHostNameDnsRecordType - { - [EnumMember(Value = "CName")] - CName, - [EnumMember(Value = "A")] - A - } - internal static class CustomHostNameDnsRecordTypeEnumExtension - { - internal static string ToSerializedValue(this CustomHostNameDnsRecordType? value) - { - return value == null ? null : ((CustomHostNameDnsRecordType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this CustomHostNameDnsRecordType value) - { - switch( value ) - { - case CustomHostNameDnsRecordType.CName: - return "CName"; - case CustomHostNameDnsRecordType.A: - return "A"; - } - return null; - } - - internal static CustomHostNameDnsRecordType? ParseCustomHostNameDnsRecordType(this string value) - { - switch( value ) - { - case "CName": - return CustomHostNameDnsRecordType.CName; - case "A": - return CustomHostNameDnsRecordType.A; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameAnalysisResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameAnalysisResult.cs deleted file mode 100644 index 78dddad2e52e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameAnalysisResult.cs +++ /dev/null @@ -1,170 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Custom domain analysis. - /// - [Rest.Serialization.JsonTransformation] - public partial class CustomHostnameAnalysisResult : ProxyOnlyResource - { - /// - /// Initializes a new instance of the CustomHostnameAnalysisResult - /// class. - /// - public CustomHostnameAnalysisResult() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomHostnameAnalysisResult - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// <code>true</code> if - /// hostname is already verified; otherwise, - /// <code>false</code>. - /// DNS verification test - /// result. Possible values include: 'Passed', 'Failed', - /// 'Skipped' - /// Raw failure - /// information if DNS verification fails. - /// <code>true</code> - /// if there is a conflict on a scale unit; otherwise, - /// <code>false</code>. - /// <code>true</code> - /// if there is a conflict across subscriptions; otherwise, - /// <code>false</code>. - /// Name of the conflicting app - /// on scale unit if it's within the same subscription. - /// CName records controller can see for - /// this hostname. - /// TXT records controller can see for this - /// hostname. - /// A records controller can see for this - /// hostname. - /// Alternate CName records - /// controller can see for this hostname. - /// Alternate TXT records controller - /// can see for this hostname. - public CustomHostnameAnalysisResult(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? isHostnameAlreadyVerified = default(bool?), DnsVerificationTestResult? customDomainVerificationTest = default(DnsVerificationTestResult?), ErrorEntity customDomainVerificationFailureInfo = default(ErrorEntity), bool? hasConflictOnScaleUnit = default(bool?), bool? hasConflictAcrossSubscription = default(bool?), string conflictingAppResourceId = default(string), IList cNameRecords = default(IList), IList txtRecords = default(IList), IList aRecords = default(IList), IList alternateCNameRecords = default(IList), IList alternateTxtRecords = default(IList)) - : base(id, name, kind, type) - { - IsHostnameAlreadyVerified = isHostnameAlreadyVerified; - CustomDomainVerificationTest = customDomainVerificationTest; - CustomDomainVerificationFailureInfo = customDomainVerificationFailureInfo; - HasConflictOnScaleUnit = hasConflictOnScaleUnit; - HasConflictAcrossSubscription = hasConflictAcrossSubscription; - ConflictingAppResourceId = conflictingAppResourceId; - CNameRecords = cNameRecords; - TxtRecords = txtRecords; - ARecords = aRecords; - AlternateCNameRecords = alternateCNameRecords; - AlternateTxtRecords = alternateTxtRecords; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if hostname is - /// already verified; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isHostnameAlreadyVerified")] - public bool? IsHostnameAlreadyVerified { get; private set; } - - /// - /// Gets DNS verification test result. Possible values include: - /// 'Passed', 'Failed', 'Skipped' - /// - [JsonProperty(PropertyName = "properties.customDomainVerificationTest")] - public DnsVerificationTestResult? CustomDomainVerificationTest { get; private set; } - - /// - /// Gets raw failure information if DNS verification fails. - /// - [JsonProperty(PropertyName = "properties.customDomainVerificationFailureInfo")] - public ErrorEntity CustomDomainVerificationFailureInfo { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if there is a - /// conflict on a scale unit; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.hasConflictOnScaleUnit")] - public bool? HasConflictOnScaleUnit { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if there is a - /// conflict across subscriptions; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.hasConflictAcrossSubscription")] - public bool? HasConflictAcrossSubscription { get; private set; } - - /// - /// Gets name of the conflicting app on scale unit if it's within the - /// same subscription. - /// - [JsonProperty(PropertyName = "properties.conflictingAppResourceId")] - public string ConflictingAppResourceId { get; private set; } - - /// - /// Gets or sets cName records controller can see for this hostname. - /// - [JsonProperty(PropertyName = "properties.cNameRecords")] - public IList CNameRecords { get; set; } - - /// - /// Gets or sets TXT records controller can see for this hostname. - /// - [JsonProperty(PropertyName = "properties.txtRecords")] - public IList TxtRecords { get; set; } - - /// - /// Gets or sets a records controller can see for this hostname. - /// - [JsonProperty(PropertyName = "properties.aRecords")] - public IList ARecords { get; set; } - - /// - /// Gets or sets alternate CName records controller can see for this - /// hostname. - /// - [JsonProperty(PropertyName = "properties.alternateCNameRecords")] - public IList AlternateCNameRecords { get; set; } - - /// - /// Gets or sets alternate TXT records controller can see for this - /// hostname. - /// - [JsonProperty(PropertyName = "properties.alternateTxtRecords")] - public IList AlternateTxtRecords { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs deleted file mode 100644 index 7abbdf5c3421..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomHostnameSites.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A hostname and its assigned sites - /// - [Rest.Serialization.JsonTransformation] - public partial class CustomHostnameSites : ProxyOnlyResource - { - /// - /// Initializes a new instance of the CustomHostnameSites class. - /// - public CustomHostnameSites() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomHostnameSites class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public CustomHostnameSites(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string customHostname = default(string), string region = default(string), IList siteResourceIds = default(IList)) - : base(id, name, kind, type) - { - CustomHostname = customHostname; - Region = region; - SiteResourceIds = siteResourceIds; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.customHostname")] - public string CustomHostname { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.region")] - public string Region { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.siteResourceIds")] - public IList SiteResourceIds { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs deleted file mode 100644 index 9e3e3b998db0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomOpenIdConnectProvider.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the custom Open ID Connect provider. - /// - public partial class CustomOpenIdConnectProvider - { - /// - /// Initializes a new instance of the CustomOpenIdConnectProvider - /// class. - /// - public CustomOpenIdConnectProvider() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomOpenIdConnectProvider - /// class. - /// - /// <code>false</code> if the custom - /// Open ID provider provider should not be enabled; otherwise, - /// <code>true</code>. - /// The configuration settings of the app - /// registration for the custom Open ID Connect provider. - /// The configuration settings of the login flow of - /// the custom Open ID Connect provider. - public CustomOpenIdConnectProvider(bool? enabled = default(bool?), OpenIdConnectRegistration registration = default(OpenIdConnectRegistration), OpenIdConnectLogin login = default(OpenIdConnectLogin)) - { - Enabled = enabled; - Registration = registration; - Login = login; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// custom Open ID provider provider should not be enabled; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "registration")] - public OpenIdConnectRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow of the - /// custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "login")] - public OpenIdConnectLogin Login { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs deleted file mode 100644 index ef8c7950ac3f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/CustomScaleRule.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App container Custom scaling rule. - /// - public partial class CustomScaleRule - { - /// - /// Initializes a new instance of the CustomScaleRule class. - /// - public CustomScaleRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the CustomScaleRule class. - /// - /// Type of the custom scale rule - /// eg: azure-servicebus, redis etc. - /// Metadata properties to describe custom scale - /// rule. - /// Authentication secrets for the custom scale - /// rule. - public CustomScaleRule(string type = default(string), IDictionary metadata = default(IDictionary), IList auth = default(IList)) - { - Type = type; - Metadata = metadata; - Auth = auth; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of the custom scale rule - /// eg: azure-servicebus, redis etc. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets metadata properties to describe custom scale rule. - /// - [JsonProperty(PropertyName = "metadata")] - public IDictionary Metadata { get; set; } - - /// - /// Gets or sets authentication secrets for the custom scale rule. - /// - [JsonProperty(PropertyName = "auth")] - public IList Auth { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs deleted file mode 100644 index c93c37142977..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dapr.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App Dapr configuration. - /// - public partial class Dapr - { - /// - /// Initializes a new instance of the Dapr class. - /// - public Dapr() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Dapr class. - /// - /// Boolean indicating if the Dapr side car is - /// enabled - /// Dapr application identifier - /// Port on which the Dapr side car - /// Collection of Dapr components - public Dapr(bool? enabled = default(bool?), string appId = default(string), int? appPort = default(int?), IList components = default(IList)) - { - Enabled = enabled; - AppId = appId; - AppPort = appPort; - Components = components; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets boolean indicating if the Dapr side car is enabled - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets dapr application identifier - /// - [JsonProperty(PropertyName = "appId")] - public string AppId { get; set; } - - /// - /// Gets or sets port on which the Dapr side car - /// - [JsonProperty(PropertyName = "appPort")] - public int? AppPort { get; set; } - - /// - /// Gets or sets collection of Dapr components - /// - [JsonProperty(PropertyName = "components")] - public IList Components { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs deleted file mode 100644 index 44c345f93ffa..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprComponent.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Dapr component configuration - /// - public partial class DaprComponent - { - /// - /// Initializes a new instance of the DaprComponent class. - /// - public DaprComponent() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DaprComponent class. - /// - /// Component name - /// Component type - /// Component version - /// Component metadata - public DaprComponent(string name = default(string), string type = default(string), string version = default(string), IList metadata = default(IList)) - { - Name = name; - Type = type; - Version = version; - Metadata = metadata; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets component name - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets component type - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets component version - /// - [JsonProperty(PropertyName = "version")] - public string Version { get; set; } - - /// - /// Gets or sets component metadata - /// - [JsonProperty(PropertyName = "metadata")] - public IList Metadata { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs deleted file mode 100644 index 8192119a780c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DaprMetadata.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App Dapr component metadata. - /// - public partial class DaprMetadata - { - /// - /// Initializes a new instance of the DaprMetadata class. - /// - public DaprMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DaprMetadata class. - /// - /// Metadata property name. - /// Metadata property value. - /// Name of the Container App secret from which - /// to pull the metadata property value. - public DaprMetadata(string name = default(string), string value = default(string), string secretRef = default(string)) - { - Name = name; - Value = value; - SecretRef = secretRef; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets metadata property name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets metadata property value. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Gets or sets name of the Container App secret from which to pull - /// the metadata property value. - /// - [JsonProperty(PropertyName = "secretRef")] - public string SecretRef { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs deleted file mode 100644 index 74f97c70231f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataProviderMetadata.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Additional configuration for a data providers - /// - public partial class DataProviderMetadata - { - /// - /// Initializes a new instance of the DataProviderMetadata class. - /// - public DataProviderMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataProviderMetadata class. - /// - /// Settings for the data provider - public DataProviderMetadata(string providerName = default(string), IList propertyBag = default(IList)) - { - ProviderName = providerName; - PropertyBag = propertyBag; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "providerName")] - public string ProviderName { get; set; } - - /// - /// Gets settings for the data provider - /// - [JsonProperty(PropertyName = "propertyBag")] - public IList PropertyBag { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataSource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataSource.cs deleted file mode 100644 index 8b2f0198c7a7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataSource.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing data source used by the detectors - /// - public partial class DataSource - { - /// - /// Initializes a new instance of the DataSource class. - /// - public DataSource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataSource class. - /// - /// Instructions if any for the data - /// source - /// Datasource Uri Links - public DataSource(IList instructions = default(IList), IList dataSourceUri = default(IList)) - { - Instructions = instructions; - DataSourceUri = dataSourceUri; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets instructions if any for the data source - /// - [JsonProperty(PropertyName = "instructions")] - public IList Instructions { get; set; } - - /// - /// Gets or sets datasource Uri Links - /// - [JsonProperty(PropertyName = "dataSourceUri")] - public IList DataSourceUri { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseColumn.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseColumn.cs deleted file mode 100644 index ecc4760a549b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseColumn.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Column definition - /// - public partial class DataTableResponseColumn - { - /// - /// Initializes a new instance of the DataTableResponseColumn class. - /// - public DataTableResponseColumn() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataTableResponseColumn class. - /// - /// Name of the column - /// Data type which looks like 'String' or - /// 'Int32'. - /// Column Type - public DataTableResponseColumn(string columnName = default(string), string dataType = default(string), string columnType = default(string)) - { - ColumnName = columnName; - DataType = dataType; - ColumnType = columnType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the column - /// - [JsonProperty(PropertyName = "columnName")] - public string ColumnName { get; set; } - - /// - /// Gets or sets data type which looks like 'String' or 'Int32'. - /// - [JsonProperty(PropertyName = "dataType")] - public string DataType { get; set; } - - /// - /// Gets or sets column Type - /// - [JsonProperty(PropertyName = "columnType")] - public string ColumnType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseObject.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseObject.cs deleted file mode 100644 index 685a53bb99b9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DataTableResponseObject.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Data Table which defines columns and raw row values - /// - public partial class DataTableResponseObject - { - /// - /// Initializes a new instance of the DataTableResponseObject class. - /// - public DataTableResponseObject() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DataTableResponseObject class. - /// - /// Name of the table - /// List of columns with data types - /// Raw row values - public DataTableResponseObject(string tableName = default(string), IList columns = default(IList), IList> rows = default(IList>)) - { - TableName = tableName; - Columns = columns; - Rows = rows; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the table - /// - [JsonProperty(PropertyName = "tableName")] - public string TableName { get; set; } - - /// - /// Gets or sets list of columns with data types - /// - [JsonProperty(PropertyName = "columns")] - public IList Columns { get; set; } - - /// - /// Gets or sets raw row values - /// - [JsonProperty(PropertyName = "rows")] - public IList> Rows { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseBackupSetting.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseBackupSetting.cs deleted file mode 100644 index d8bd1344a233..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseBackupSetting.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Database backup settings. - /// - public partial class DatabaseBackupSetting - { - /// - /// Initializes a new instance of the DatabaseBackupSetting class. - /// - public DatabaseBackupSetting() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DatabaseBackupSetting class. - /// - /// Database type (e.g. SqlAzure / MySql). - /// Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', - /// 'PostgreSql' - /// Contains a connection string - /// name that is linked to the SiteConfig.ConnectionStrings. - /// This is used during restore with overwrite connection strings - /// options. - /// Contains a connection string to a - /// database which is being backed up or restored. If the restore - /// should happen to a new database, the database name inside is the - /// new one. - public DatabaseBackupSetting(string databaseType, string name = default(string), string connectionStringName = default(string), string connectionString = default(string)) - { - DatabaseType = databaseType; - Name = name; - ConnectionStringName = connectionStringName; - ConnectionString = connectionString; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets database type (e.g. SqlAzure / MySql). Possible values - /// include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql' - /// - [JsonProperty(PropertyName = "databaseType")] - public string DatabaseType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets contains a connection string name that is linked to - /// the SiteConfig.ConnectionStrings. - /// This is used during restore with overwrite connection strings - /// options. - /// - [JsonProperty(PropertyName = "connectionStringName")] - public string ConnectionStringName { get; set; } - - /// - /// Gets or sets contains a connection string to a database which is - /// being backed up or restored. If the restore should happen to a new - /// database, the database name inside is the new one. - /// - [JsonProperty(PropertyName = "connectionString")] - public string ConnectionString { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (DatabaseType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "DatabaseType"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseType.cs deleted file mode 100644 index ee4f92916ee0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DatabaseType.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for DatabaseType. - /// - public static class DatabaseType - { - public const string SqlAzure = "SqlAzure"; - public const string MySql = "MySql"; - public const string LocalMySql = "LocalMySql"; - public const string PostgreSql = "PostgreSql"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs deleted file mode 100644 index 4127dc17ef27..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultAuthorizationPolicy.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the Azure Active Directory default - /// authorization policy. - /// - public partial class DefaultAuthorizationPolicy - { - /// - /// Initializes a new instance of the DefaultAuthorizationPolicy class. - /// - public DefaultAuthorizationPolicy() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DefaultAuthorizationPolicy class. - /// - /// The configuration settings of the - /// Azure Active Directory allowed principals. - /// The configuration settings of the - /// Azure Active Directory allowed applications. - public DefaultAuthorizationPolicy(AllowedPrincipals allowedPrincipals = default(AllowedPrincipals), IList allowedApplications = default(IList)) - { - AllowedPrincipals = allowedPrincipals; - AllowedApplications = allowedApplications; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory allowed principals. - /// - [JsonProperty(PropertyName = "allowedPrincipals")] - public AllowedPrincipals AllowedPrincipals { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory allowed applications. - /// - [JsonProperty(PropertyName = "allowedApplications")] - public IList AllowedApplications { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponse.cs deleted file mode 100644 index f70bb4e938fa..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponse.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// App Service error response. - /// - public partial class DefaultErrorResponse - { - /// - /// Initializes a new instance of the DefaultErrorResponse class. - /// - public DefaultErrorResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DefaultErrorResponse class. - /// - /// Error model. - public DefaultErrorResponse(DefaultErrorResponseError error = default(DefaultErrorResponseError)) - { - Error = error; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets error model. - /// - [JsonProperty(PropertyName = "error")] - public DefaultErrorResponseError Error { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseError.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseError.cs deleted file mode 100644 index 3c389512860f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseError.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Error model. - /// - public partial class DefaultErrorResponseError - { - /// - /// Initializes a new instance of the DefaultErrorResponseError class. - /// - public DefaultErrorResponseError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DefaultErrorResponseError class. - /// - /// Standardized string to programmatically identify - /// the error. - /// Detailed error description and debugging - /// information. - /// Detailed error description and debugging - /// information. - /// More information to debug error. - public DefaultErrorResponseError(string code = default(string), string message = default(string), string target = default(string), IList details = default(IList), string innererror = default(string)) - { - Code = code; - Message = message; - Target = target; - Details = details; - Innererror = innererror; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets standardized string to programmatically identify the error. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets detailed error description and debugging information. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets detailed error description and debugging information. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - - /// - /// Gets more information to debug error. - /// - [JsonProperty(PropertyName = "innererror")] - public string Innererror { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseErrorDetailsItem.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseErrorDetailsItem.cs deleted file mode 100644 index 5a4b118818cc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseErrorDetailsItem.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Detailed errors. - /// - public partial class DefaultErrorResponseErrorDetailsItem - { - /// - /// Initializes a new instance of the - /// DefaultErrorResponseErrorDetailsItem class. - /// - public DefaultErrorResponseErrorDetailsItem() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DefaultErrorResponseErrorDetailsItem class. - /// - /// Standardized string to programmatically identify - /// the error. - /// Detailed error description and debugging - /// information. - /// Detailed error description and debugging - /// information. - public DefaultErrorResponseErrorDetailsItem(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 standardized string to programmatically identify the error. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; private set; } - - /// - /// Gets detailed error description and debugging information. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - /// - /// Gets detailed error description and debugging information. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseException.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseException.cs deleted file mode 100644 index d2605d3468fb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DefaultErrorResponseException.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - - /// - /// Exception thrown for an invalid response with DefaultErrorResponse - /// information. - /// - public partial class DefaultErrorResponseException : 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 DefaultErrorResponse Body { get; set; } - - /// - /// Initializes a new instance of the DefaultErrorResponseException class. - /// - public DefaultErrorResponseException() - { - } - - /// - /// Initializes a new instance of the DefaultErrorResponseException class. - /// - /// The exception message. - public DefaultErrorResponseException(string message) - : this(message, null) - { - } - - /// - /// Initializes a new instance of the DefaultErrorResponseException class. - /// - /// The exception message. - /// Inner exception. - public DefaultErrorResponseException(string message, System.Exception innerException) - : base(message, innerException) - { - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedAppRestoreRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedAppRestoreRequest.cs deleted file mode 100644 index 347a22b2abf2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedAppRestoreRequest.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Details about restoring a deleted app. - /// - [Rest.Serialization.JsonTransformation] - public partial class DeletedAppRestoreRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DeletedAppRestoreRequest class. - /// - public DeletedAppRestoreRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeletedAppRestoreRequest class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// ARM resource ID of the deleted app. - /// Example: - /// /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} - /// If true, deleted site - /// configuration, in addition to content, will be restored. - /// Point in time to restore the deleted app - /// from, formatted as a DateTime string. - /// If unspecified, default value is the time that the app was - /// deleted. - /// If true, the snapshot is retrieved - /// from DRSecondary endpoint. - public DeletedAppRestoreRequest(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string deletedSiteId = default(string), bool? recoverConfiguration = default(bool?), string snapshotTime = default(string), bool? useDRSecondary = default(bool?)) - : base(id, name, kind, type) - { - DeletedSiteId = deletedSiteId; - RecoverConfiguration = recoverConfiguration; - SnapshotTime = snapshotTime; - UseDRSecondary = useDRSecondary; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets ARM resource ID of the deleted app. Example: - /// /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} - /// - [JsonProperty(PropertyName = "properties.deletedSiteId")] - public string DeletedSiteId { get; set; } - - /// - /// Gets or sets if true, deleted site configuration, in addition to - /// content, will be restored. - /// - [JsonProperty(PropertyName = "properties.recoverConfiguration")] - public bool? RecoverConfiguration { get; set; } - - /// - /// Gets or sets point in time to restore the deleted app from, - /// formatted as a DateTime string. - /// If unspecified, default value is the time that the app was deleted. - /// - [JsonProperty(PropertyName = "properties.snapshotTime")] - public string SnapshotTime { get; set; } - - /// - /// Gets or sets if true, the snapshot is retrieved from DRSecondary - /// endpoint. - /// - [JsonProperty(PropertyName = "properties.useDRSecondary")] - public bool? UseDRSecondary { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedSite.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedSite.cs deleted file mode 100644 index 565a9b6b34d0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeletedSite.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A deleted app. - /// - [Rest.Serialization.JsonTransformation] - public partial class DeletedSite : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DeletedSite class. - /// - public DeletedSite() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeletedSite class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Numeric id for the deleted site - /// Time in UTC when the app was - /// deleted. - /// Subscription containing the deleted - /// site - /// ResourceGroup that contained the - /// deleted site - /// Name of the deleted site - /// Slot of the deleted site - /// Kind of site that was deleted - /// Geo Region of the deleted site - public DeletedSite(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? deletedSiteId = default(int?), string deletedTimestamp = default(string), string subscription = default(string), string resourceGroup = default(string), string deletedSiteName = default(string), string slot = default(string), string deletedSiteKind = default(string), string geoRegionName = default(string)) - : base(id, name, kind, type) - { - DeletedSiteId = deletedSiteId; - DeletedTimestamp = deletedTimestamp; - Subscription = subscription; - ResourceGroup = resourceGroup; - DeletedSiteName = deletedSiteName; - Slot = slot; - DeletedSiteKind = deletedSiteKind; - GeoRegionName = geoRegionName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets numeric id for the deleted site - /// - [JsonProperty(PropertyName = "properties.deletedSiteId")] - public int? DeletedSiteId { get; private set; } - - /// - /// Gets time in UTC when the app was deleted. - /// - [JsonProperty(PropertyName = "properties.deletedTimestamp")] - public string DeletedTimestamp { get; private set; } - - /// - /// Gets subscription containing the deleted site - /// - [JsonProperty(PropertyName = "properties.subscription")] - public string Subscription { get; private set; } - - /// - /// Gets resourceGroup that contained the deleted site - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - - /// - /// Gets name of the deleted site - /// - [JsonProperty(PropertyName = "properties.deletedSiteName")] - public string DeletedSiteName { get; private set; } - - /// - /// Gets slot of the deleted site - /// - [JsonProperty(PropertyName = "properties.slot")] - public string Slot { get; private set; } - - /// - /// Gets kind of site that was deleted - /// - [JsonProperty(PropertyName = "properties.kind")] - public string DeletedSiteKind { get; private set; } - - /// - /// Gets geo Region of the deleted site - /// - [JsonProperty(PropertyName = "properties.geoRegionName")] - public string GeoRegionName { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Deployment.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Deployment.cs deleted file mode 100644 index 9a88a578c6b1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Deployment.cs +++ /dev/null @@ -1,125 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// User credentials used for publishing activity. - /// - [Rest.Serialization.JsonTransformation] - public partial class Deployment : ProxyOnlyResource - { - /// - /// Initializes a new instance of the Deployment class. - /// - public Deployment() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Deployment class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Deployment status. - /// Details about deployment status. - /// Who authored the deployment. - /// Who performed the deployment. - /// Author email. - /// Start time. - /// End time. - /// True if deployment is currently active, false - /// if completed and null if not started. - /// Details on deployment. - public Deployment(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? status = default(int?), string message = default(string), string author = default(string), string deployer = default(string), string authorEmail = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), bool? active = default(bool?), string details = default(string)) - : base(id, name, kind, type) - { - Status = status; - Message = message; - Author = author; - Deployer = deployer; - AuthorEmail = authorEmail; - StartTime = startTime; - EndTime = endTime; - Active = active; - Details = details; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets deployment status. - /// - [JsonProperty(PropertyName = "properties.status")] - public int? Status { get; set; } - - /// - /// Gets or sets details about deployment status. - /// - [JsonProperty(PropertyName = "properties.message")] - public string Message { get; set; } - - /// - /// Gets or sets who authored the deployment. - /// - [JsonProperty(PropertyName = "properties.author")] - public string Author { get; set; } - - /// - /// Gets or sets who performed the deployment. - /// - [JsonProperty(PropertyName = "properties.deployer")] - public string Deployer { get; set; } - - /// - /// Gets or sets author email. - /// - [JsonProperty(PropertyName = "properties.author_email")] - public string AuthorEmail { get; set; } - - /// - /// Gets or sets start time. - /// - [JsonProperty(PropertyName = "properties.start_time")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time. - /// - [JsonProperty(PropertyName = "properties.end_time")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets true if deployment is currently active, false if - /// completed and null if not started. - /// - [JsonProperty(PropertyName = "properties.active")] - public bool? Active { get; set; } - - /// - /// Gets or sets details on deployment. - /// - [JsonProperty(PropertyName = "properties.details")] - public string Details { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeploymentLocations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeploymentLocations.cs deleted file mode 100644 index a51e11fef786..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DeploymentLocations.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// List of available locations (regions or App Service Environments) for - /// deployment of App Service resources. - /// - public partial class DeploymentLocations - { - /// - /// Initializes a new instance of the DeploymentLocations class. - /// - public DeploymentLocations() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DeploymentLocations class. - /// - /// Available regions. - /// Available App Service - /// Environments with full descriptions of the environments. - /// Available App - /// Service Environments with basic information. - public DeploymentLocations(IList locations = default(IList), IList hostingEnvironments = default(IList), IList hostingEnvironmentDeploymentInfos = default(IList)) - { - Locations = locations; - HostingEnvironments = hostingEnvironments; - HostingEnvironmentDeploymentInfos = hostingEnvironmentDeploymentInfos; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets available regions. - /// - [JsonProperty(PropertyName = "locations")] - public IList Locations { get; set; } - - /// - /// Gets or sets available App Service Environments with full - /// descriptions of the environments. - /// - [JsonProperty(PropertyName = "hostingEnvironments")] - public IList HostingEnvironments { get; set; } - - /// - /// Gets or sets available App Service Environments with basic - /// information. - /// - [JsonProperty(PropertyName = "hostingEnvironmentDeploymentInfos")] - public IList HostingEnvironmentDeploymentInfos { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorAbnormalTimePeriod.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorAbnormalTimePeriod.cs deleted file mode 100644 index f91fda4d5d63..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorAbnormalTimePeriod.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing Abnormal Time Period detected. - /// - public partial class DetectorAbnormalTimePeriod - { - /// - /// Initializes a new instance of the DetectorAbnormalTimePeriod class. - /// - public DetectorAbnormalTimePeriod() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DetectorAbnormalTimePeriod class. - /// - /// Start time of the correlated event - /// End time of the correlated event - /// Message describing the event - /// Represents the name of the Detector - /// Represents the rank of the Detector - /// Downtime metadata - /// Represents the type of the Detector. Possible - /// values include: 'ServiceIncident', 'AppDeployment', 'AppCrash', - /// 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', - /// 'PlatformIssue', 'Other' - /// List of proposed solutions - public DetectorAbnormalTimePeriod(System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string message = default(string), string source = default(string), double? priority = default(double?), IList> metaData = default(IList>), IssueType? type = default(IssueType?), IList solutions = default(IList)) - { - StartTime = startTime; - EndTime = endTime; - Message = message; - Source = source; - Priority = priority; - MetaData = metaData; - Type = type; - Solutions = solutions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets start time of the correlated event - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the correlated event - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets message describing the event - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// Gets or sets represents the name of the Detector - /// - [JsonProperty(PropertyName = "source")] - public string Source { get; set; } - - /// - /// Gets or sets represents the rank of the Detector - /// - [JsonProperty(PropertyName = "priority")] - public double? Priority { get; set; } - - /// - /// Gets or sets downtime metadata - /// - [JsonProperty(PropertyName = "metaData")] - public IList> MetaData { get; set; } - - /// - /// Gets or sets represents the type of the Detector. Possible values - /// include: 'ServiceIncident', 'AppDeployment', 'AppCrash', - /// 'RuntimeIssueDetected', 'AseDeployment', 'UserIssue', - /// 'PlatformIssue', 'Other' - /// - [JsonProperty(PropertyName = "type")] - public IssueType? Type { get; set; } - - /// - /// Gets or sets list of proposed solutions - /// - [JsonProperty(PropertyName = "solutions")] - public IList Solutions { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs deleted file mode 100644 index 19ffd3d12c0d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinition.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Class representing detector definition - /// - public partial class DetectorDefinition - { - /// - /// Initializes a new instance of the DetectorDefinition class. - /// - public DetectorDefinition() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DetectorDefinition class. - /// - /// Display name of the detector - /// Description of the detector - /// Detector Rank - /// Flag representing whether detector is - /// enabled or not. - public DetectorDefinition(string displayName = default(string), string description = default(string), double? rank = default(double?), bool? isEnabled = default(bool?)) - { - DisplayName = displayName; - Description = description; - Rank = rank; - IsEnabled = isEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets display name of the detector - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets description of the detector - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; private set; } - - /// - /// Gets detector Rank - /// - [JsonProperty(PropertyName = "rank")] - public double? Rank { get; private set; } - - /// - /// Gets flag representing whether detector is enabled or not. - /// - [JsonProperty(PropertyName = "isEnabled")] - public bool? IsEnabled { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs deleted file mode 100644 index 2823dba0e9c5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorDefinitionResource.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM resource for a detector definition - /// - [Rest.Serialization.JsonTransformation] - public partial class DetectorDefinitionResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DetectorDefinitionResource class. - /// - public DetectorDefinitionResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DetectorDefinitionResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Display name of the detector - /// Description of the detector - /// Detector Rank - /// Flag representing whether detector is - /// enabled or not. - public DetectorDefinitionResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string displayName = default(string), string description = default(string), double? rank = default(double?), bool? isEnabled = default(bool?)) - : base(id, name, kind, type) - { - DisplayName = displayName; - Description = description; - Rank = rank; - IsEnabled = isEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets display name of the detector - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets description of the detector - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - /// - /// Gets detector Rank - /// - [JsonProperty(PropertyName = "properties.rank")] - public double? Rank { get; private set; } - - /// - /// Gets flag representing whether detector is enabled or not. - /// - [JsonProperty(PropertyName = "properties.isEnabled")] - public bool? IsEnabled { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs deleted file mode 100644 index 6bef8197eb83..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorInfo.cs +++ /dev/null @@ -1,126 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Definition of Detector - /// - public partial class DetectorInfo - { - /// - /// Initializes a new instance of the DetectorInfo class. - /// - public DetectorInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DetectorInfo class. - /// - /// Id of detector - /// Name of detector - /// Short description of the detector and its - /// purpose. - /// Author of the detector. - /// Problem category. This serves for organizing - /// group for detectors. - /// List of Support Topics for which - /// this detector is enabled. - /// Analysis Types for which this detector - /// should apply to. - /// Whether this detector is an Analysis Detector or - /// not. Possible values include: 'Detector', 'Analysis', - /// 'CategoryOverview' - /// Defines score of a detector to power ML based - /// matching. - public DetectorInfo(string id = default(string), string name = default(string), string description = default(string), string author = default(string), string category = default(string), IList supportTopicList = default(IList), IList analysisType = default(IList), DetectorType? type = default(DetectorType?), double? score = default(double?)) - { - Id = id; - Name = name; - Description = description; - Author = author; - Category = category; - SupportTopicList = supportTopicList; - AnalysisType = analysisType; - Type = type; - Score = score; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets id of detector - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets name of detector - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets short description of the detector and its purpose. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; private set; } - - /// - /// Gets author of the detector. - /// - [JsonProperty(PropertyName = "author")] - public string Author { get; private set; } - - /// - /// Gets problem category. This serves for organizing group for - /// detectors. - /// - [JsonProperty(PropertyName = "category")] - public string Category { get; private set; } - - /// - /// Gets list of Support Topics for which this detector is enabled. - /// - [JsonProperty(PropertyName = "supportTopicList")] - public IList SupportTopicList { get; private set; } - - /// - /// Gets analysis Types for which this detector should apply to. - /// - [JsonProperty(PropertyName = "analysisType")] - public IList AnalysisType { get; private set; } - - /// - /// Gets whether this detector is an Analysis Detector or not. Possible - /// values include: 'Detector', 'Analysis', 'CategoryOverview' - /// - [JsonProperty(PropertyName = "type")] - public DetectorType? Type { get; private set; } - - /// - /// Gets defines score of a detector to power ML based matching. - /// - [JsonProperty(PropertyName = "score")] - public double? Score { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs deleted file mode 100644 index 79366fbad0af..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorResponse.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing Response from Detector - /// - [Rest.Serialization.JsonTransformation] - public partial class DetectorResponse : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DetectorResponse class. - /// - public DetectorResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DetectorResponse class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// metadata for the detector - /// Data Set - /// Indicates status of the most severe - /// insight. - /// Additional configuration for - /// different data providers to be used by the UI - /// Suggested utterances where the - /// detector can be applicable. - public DetectorResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), DetectorInfo metadata = default(DetectorInfo), IList dataset = default(IList), Status status = default(Status), IList dataProvidersMetadata = default(IList), QueryUtterancesResults suggestedUtterances = default(QueryUtterancesResults)) - : base(id, name, kind, type) - { - Metadata = metadata; - Dataset = dataset; - Status = status; - DataProvidersMetadata = dataProvidersMetadata; - SuggestedUtterances = suggestedUtterances; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets metadata for the detector - /// - [JsonProperty(PropertyName = "properties.metadata")] - public DetectorInfo Metadata { get; set; } - - /// - /// Gets or sets data Set - /// - [JsonProperty(PropertyName = "properties.dataset")] - public IList Dataset { get; set; } - - /// - /// Gets or sets indicates status of the most severe insight. - /// - [JsonProperty(PropertyName = "properties.status")] - public Status Status { get; set; } - - /// - /// Gets or sets additional configuration for different data providers - /// to be used by the UI - /// - [JsonProperty(PropertyName = "properties.dataProvidersMetadata")] - public IList DataProvidersMetadata { get; set; } - - /// - /// Gets or sets suggested utterances where the detector can be - /// applicable. - /// - [JsonProperty(PropertyName = "properties.suggestedUtterances")] - public QueryUtterancesResults SuggestedUtterances { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs deleted file mode 100644 index 23370a2c5fec..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DetectorType.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for DetectorType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DetectorType - { - [EnumMember(Value = "Detector")] - Detector, - [EnumMember(Value = "Analysis")] - Analysis, - [EnumMember(Value = "CategoryOverview")] - CategoryOverview - } - internal static class DetectorTypeEnumExtension - { - internal static string ToSerializedValue(this DetectorType? value) - { - return value == null ? null : ((DetectorType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this DetectorType value) - { - switch( value ) - { - case DetectorType.Detector: - return "Detector"; - case DetectorType.Analysis: - return "Analysis"; - case DetectorType.CategoryOverview: - return "CategoryOverview"; - } - return null; - } - - internal static DetectorType? ParseDetectorType(this string value) - { - switch( value ) - { - case "Detector": - return DetectorType.Detector; - case "Analysis": - return DetectorType.Analysis; - case "CategoryOverview": - return DetectorType.CategoryOverview; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticAnalysis.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticAnalysis.cs deleted file mode 100644 index a14320e7e5e3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticAnalysis.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing a diagnostic analysis done on an application - /// - [Rest.Serialization.JsonTransformation] - public partial class DiagnosticAnalysis : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DiagnosticAnalysis class. - /// - public DiagnosticAnalysis() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticAnalysis class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Start time of the period - /// End time of the period - /// List of time periods. - /// Data by each detector - /// Data by each detector for - /// detectors that did not corelate - public DiagnosticAnalysis(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList abnormalTimePeriods = default(IList), IList payload = default(IList), IList nonCorrelatedDetectors = default(IList)) - : base(id, name, kind, type) - { - StartTime = startTime; - EndTime = endTime; - AbnormalTimePeriods = abnormalTimePeriods; - Payload = payload; - NonCorrelatedDetectors = nonCorrelatedDetectors; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets start time of the period - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the period - /// - [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets list of time periods. - /// - [JsonProperty(PropertyName = "properties.abnormalTimePeriods")] - public IList AbnormalTimePeriods { get; set; } - - /// - /// Gets or sets data by each detector - /// - [JsonProperty(PropertyName = "properties.payload")] - public IList Payload { get; set; } - - /// - /// Gets or sets data by each detector for detectors that did not - /// corelate - /// - [JsonProperty(PropertyName = "properties.nonCorrelatedDetectors")] - public IList NonCorrelatedDetectors { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticCategory.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticCategory.cs deleted file mode 100644 index 57b10cf75dd7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticCategory.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Class representing detector definition - /// - [Rest.Serialization.JsonTransformation] - public partial class DiagnosticCategory : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DiagnosticCategory class. - /// - public DiagnosticCategory() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticCategory class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Description of the diagnostic - /// category - public DiagnosticCategory(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string description = default(string)) - : base(id, name, kind, type) - { - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets description of the diagnostic category - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticData.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticData.cs deleted file mode 100644 index af8f9d08d4c9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticData.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Set of data with rendering instructions - /// - public partial class DiagnosticData - { - /// - /// Initializes a new instance of the DiagnosticData class. - /// - public DiagnosticData() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticData class. - /// - /// Data in table form - /// Properties that describe how the - /// table should be rendered - public DiagnosticData(DataTableResponseObject table = default(DataTableResponseObject), Rendering renderingProperties = default(Rendering)) - { - Table = table; - RenderingProperties = renderingProperties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets data in table form - /// - [JsonProperty(PropertyName = "table")] - public DataTableResponseObject Table { get; set; } - - /// - /// Gets or sets properties that describe how the table should be - /// rendered - /// - [JsonProperty(PropertyName = "renderingProperties")] - public Rendering RenderingProperties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticDetectorResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticDetectorResponse.cs deleted file mode 100644 index 2a896dd8fdef..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticDetectorResponse.cs +++ /dev/null @@ -1,120 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing Response from Diagnostic Detectors - /// - [Rest.Serialization.JsonTransformation] - public partial class DiagnosticDetectorResponse : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DiagnosticDetectorResponse class. - /// - public DiagnosticDetectorResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticDetectorResponse class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Start time of the period - /// End time of the period - /// Flag representing Issue was - /// detected. - /// Detector's definition - /// Metrics provided by the detector - /// List of Correlated events found - /// by the detector - /// Additional Data that detector wants to - /// send. - /// Meta Data - public DiagnosticDetectorResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), bool? issueDetected = default(bool?), DetectorDefinition detectorDefinition = default(DetectorDefinition), IList metrics = default(IList), IList abnormalTimePeriods = default(IList), IList> data = default(IList>), ResponseMetaData responseMetaData = default(ResponseMetaData)) - : base(id, name, kind, type) - { - StartTime = startTime; - EndTime = endTime; - IssueDetected = issueDetected; - DetectorDefinition = detectorDefinition; - Metrics = metrics; - AbnormalTimePeriods = abnormalTimePeriods; - Data = data; - ResponseMetaData = responseMetaData; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets start time of the period - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the period - /// - [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets flag representing Issue was detected. - /// - [JsonProperty(PropertyName = "properties.issueDetected")] - public bool? IssueDetected { get; set; } - - /// - /// Gets or sets detector's definition - /// - [JsonProperty(PropertyName = "properties.detectorDefinition")] - public DetectorDefinition DetectorDefinition { get; set; } - - /// - /// Gets or sets metrics provided by the detector - /// - [JsonProperty(PropertyName = "properties.metrics")] - public IList Metrics { get; set; } - - /// - /// Gets or sets list of Correlated events found by the detector - /// - [JsonProperty(PropertyName = "properties.abnormalTimePeriods")] - public IList AbnormalTimePeriods { get; set; } - - /// - /// Gets or sets additional Data that detector wants to send. - /// - [JsonProperty(PropertyName = "properties.data")] - public IList> Data { get; set; } - - /// - /// Gets or sets meta Data - /// - [JsonProperty(PropertyName = "properties.responseMetaData")] - public ResponseMetaData ResponseMetaData { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSample.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSample.cs deleted file mode 100644 index 5c39fa5a0748..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSample.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Class representing Diagnostic Metric - /// - public partial class DiagnosticMetricSample - { - /// - /// Initializes a new instance of the DiagnosticMetricSample class. - /// - public DiagnosticMetricSample() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticMetricSample class. - /// - /// Time at which metric is measured - /// Role Instance. Null if this counter is - /// not per instance - /// This is returned and should be whichever instance name we desire to - /// be returned - /// i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) - /// where RDWORKERNAME is Machine name below and RoleInstance name in - /// parenthesis - /// Total value of the metric. If multiple - /// measurements are made this will have sum of all. - /// Maximum of the metric sampled during the time - /// period - /// Minimum of the metric sampled during the time - /// period - /// Whether the values are aggregates across - /// all workers or not - public DiagnosticMetricSample(System.DateTime? timestamp = default(System.DateTime?), string roleInstance = default(string), double? total = default(double?), double? maximum = default(double?), double? minimum = default(double?), bool? isAggregated = default(bool?)) - { - Timestamp = timestamp; - RoleInstance = roleInstance; - Total = total; - Maximum = maximum; - Minimum = minimum; - IsAggregated = isAggregated; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets time at which metric is measured - /// - [JsonProperty(PropertyName = "timestamp")] - public System.DateTime? Timestamp { get; set; } - - /// - /// Gets or sets role Instance. Null if this counter is not per - /// instance - /// This is returned and should be whichever instance name we desire to - /// be returned - /// i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) - /// where RDWORKERNAME is Machine name below and RoleInstance name in - /// parenthesis - /// - [JsonProperty(PropertyName = "roleInstance")] - public string RoleInstance { get; set; } - - /// - /// Gets or sets total value of the metric. If multiple measurements - /// are made this will have sum of all. - /// - [JsonProperty(PropertyName = "total")] - public double? Total { get; set; } - - /// - /// Gets or sets maximum of the metric sampled during the time period - /// - [JsonProperty(PropertyName = "maximum")] - public double? Maximum { get; set; } - - /// - /// Gets or sets minimum of the metric sampled during the time period - /// - [JsonProperty(PropertyName = "minimum")] - public double? Minimum { get; set; } - - /// - /// Gets or sets whether the values are aggregates across all workers - /// or not - /// - [JsonProperty(PropertyName = "isAggregated")] - public bool? IsAggregated { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSet.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSet.cs deleted file mode 100644 index d815618a15d5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DiagnosticMetricSet.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class representing Diagnostic Metric information - /// - public partial class DiagnosticMetricSet - { - /// - /// Initializes a new instance of the DiagnosticMetricSet class. - /// - public DiagnosticMetricSet() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DiagnosticMetricSet class. - /// - /// Name of the metric - /// Metric's unit - /// Start time of the period - /// End time of the period - /// Presented time grain. Supported grains at - /// the moment are PT1M, PT1H, P1D - /// Collection of metric values for the selected - /// period based on the - /// {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} - public DiagnosticMetricSet(string name = default(string), string unit = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), IList values = default(IList)) - { - Name = name; - Unit = unit; - StartTime = startTime; - EndTime = endTime; - TimeGrain = timeGrain; - Values = values; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the metric - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets metric's unit - /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } - - /// - /// Gets or sets start time of the period - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the period - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets presented time grain. Supported grains at the moment - /// are PT1M, PT1H, P1D - /// - [JsonProperty(PropertyName = "timeGrain")] - public string TimeGrain { get; set; } - - /// - /// Gets or sets collection of metric values for the selected period - /// based on the - /// {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} - /// - [JsonProperty(PropertyName = "values")] - public IList Values { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dimension.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dimension.cs deleted file mode 100644 index 1d48f3d78976..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Dimension.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Dimension of a resource metric. For e.g. instance specific HTTP - /// requests for a web app, - /// where instance name is dimension of the metric HTTP request - /// - public partial class Dimension - { - /// - /// Initializes a new instance of the Dimension class. - /// - public Dimension() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Dimension class. - /// - public Dimension(string name = default(string), string displayName = default(string), string internalName = default(string), bool? toBeExportedForShoebox = default(bool?)) - { - Name = name; - DisplayName = displayName; - InternalName = internalName; - ToBeExportedForShoebox = toBeExportedForShoebox; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "internalName")] - public string InternalName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "toBeExportedForShoebox")] - public bool? ToBeExportedForShoebox { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsType.cs deleted file mode 100644 index 2790d6b0308b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for DnsType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DnsType - { - [EnumMember(Value = "AzureDns")] - AzureDns, - [EnumMember(Value = "DefaultDomainRegistrarDns")] - DefaultDomainRegistrarDns - } - internal static class DnsTypeEnumExtension - { - internal static string ToSerializedValue(this DnsType? value) - { - return value == null ? null : ((DnsType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this DnsType value) - { - switch( value ) - { - case DnsType.AzureDns: - return "AzureDns"; - case DnsType.DefaultDomainRegistrarDns: - return "DefaultDomainRegistrarDns"; - } - return null; - } - - internal static DnsType? ParseDnsType(this string value) - { - switch( value ) - { - case "AzureDns": - return DnsType.AzureDns; - case "DefaultDomainRegistrarDns": - return DnsType.DefaultDomainRegistrarDns; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsVerificationTestResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsVerificationTestResult.cs deleted file mode 100644 index eabbc5fe01af..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DnsVerificationTestResult.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for DnsVerificationTestResult. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DnsVerificationTestResult - { - [EnumMember(Value = "Passed")] - Passed, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Skipped")] - Skipped - } - internal static class DnsVerificationTestResultEnumExtension - { - internal static string ToSerializedValue(this DnsVerificationTestResult? value) - { - return value == null ? null : ((DnsVerificationTestResult)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this DnsVerificationTestResult value) - { - switch( value ) - { - case DnsVerificationTestResult.Passed: - return "Passed"; - case DnsVerificationTestResult.Failed: - return "Failed"; - case DnsVerificationTestResult.Skipped: - return "Skipped"; - } - return null; - } - - internal static DnsVerificationTestResult? ParseDnsVerificationTestResult(this string value) - { - switch( value ) - { - case "Passed": - return DnsVerificationTestResult.Passed; - case "Failed": - return DnsVerificationTestResult.Failed; - case "Skipped": - return DnsVerificationTestResult.Skipped; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Domain.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Domain.cs deleted file mode 100644 index 7b37c3176248..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Domain.cs +++ /dev/null @@ -1,300 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Information about a domain. - /// - [Rest.Serialization.JsonTransformation] - public partial class Domain : Resource - { - /// - /// Initializes a new instance of the Domain class. - /// - public Domain() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Domain class. - /// - /// Resource Location. - /// Administrative contact. - /// Billing contact. - /// Registrant contact. - /// Technical contact. - /// Legal agreement consent. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Domain registration status. - /// Possible values include: 'Active', 'Awaiting', 'Cancelled', - /// 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', - /// 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', - /// 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', - /// 'JsonConverterFailed' - /// Domain provisioning state. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// Name servers. - /// <code>true</code> if domain - /// privacy is enabled for this domain; otherwise, - /// <code>false</code>. - /// Domain creation timestamp. - /// Domain expiration timestamp. - /// Timestamp when the domain was renewed - /// last time. - /// <code>true</code> if the domain - /// should be automatically renewed; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// Azure can assign this domain to App Service apps; otherwise, - /// <code>false</code>. This value will be - /// <code>true</code> if domain registration status is - /// active and - /// it is hosted on name servers Azure has programmatic access - /// to. - /// All hostnames derived from the - /// domain and assigned to Azure resources. - /// Reasons why domain is not - /// renewable. - /// Current DNS type. Possible values include: - /// 'AzureDns', 'DefaultDomainRegistrarDns' - /// Azure DNS Zone to use - /// Target DNS type (would be used for - /// migration). Possible values include: 'AzureDns', - /// 'DefaultDomainRegistrarDns' - public Domain(string location, Contact contactAdmin, Contact contactBilling, Contact contactRegistrant, Contact contactTech, DomainPurchaseConsent consent, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), DomainStatus? registrationStatus = default(DomainStatus?), ProvisioningState? provisioningState = default(ProvisioningState?), IList nameServers = default(IList), bool? privacy = default(bool?), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), System.DateTime? lastRenewedTime = default(System.DateTime?), bool? autoRenew = default(bool?), bool? readyForDnsRecordManagement = default(bool?), IList managedHostNames = default(IList), IList domainNotRenewableReasons = default(IList), DnsType? dnsType = default(DnsType?), string dnsZoneId = default(string), DnsType? targetDnsType = default(DnsType?), string authCode = default(string)) - : base(location, id, name, kind, type, tags) - { - ContactAdmin = contactAdmin; - ContactBilling = contactBilling; - ContactRegistrant = contactRegistrant; - ContactTech = contactTech; - RegistrationStatus = registrationStatus; - ProvisioningState = provisioningState; - NameServers = nameServers; - Privacy = privacy; - CreatedTime = createdTime; - ExpirationTime = expirationTime; - LastRenewedTime = lastRenewedTime; - AutoRenew = autoRenew; - ReadyForDnsRecordManagement = readyForDnsRecordManagement; - ManagedHostNames = managedHostNames; - Consent = consent; - DomainNotRenewableReasons = domainNotRenewableReasons; - DnsType = dnsType; - DnsZoneId = dnsZoneId; - TargetDnsType = targetDnsType; - AuthCode = authCode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets administrative contact. - /// - [JsonProperty(PropertyName = "properties.contactAdmin")] - public Contact ContactAdmin { get; set; } - - /// - /// Gets or sets billing contact. - /// - [JsonProperty(PropertyName = "properties.contactBilling")] - public Contact ContactBilling { get; set; } - - /// - /// Gets or sets registrant contact. - /// - [JsonProperty(PropertyName = "properties.contactRegistrant")] - public Contact ContactRegistrant { get; set; } - - /// - /// Gets or sets technical contact. - /// - [JsonProperty(PropertyName = "properties.contactTech")] - public Contact ContactTech { get; set; } - - /// - /// Gets domain registration status. Possible values include: 'Active', - /// 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', - /// 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', - /// 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', - /// 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed' - /// - [JsonProperty(PropertyName = "properties.registrationStatus")] - public DomainStatus? RegistrationStatus { get; private set; } - - /// - /// Gets domain provisioning state. Possible values include: - /// 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets name servers. - /// - [JsonProperty(PropertyName = "properties.nameServers")] - public IList NameServers { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// domain privacy is enabled for this domain; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.privacy")] - public bool? Privacy { get; set; } - - /// - /// Gets domain creation timestamp. - /// - [JsonProperty(PropertyName = "properties.createdTime")] - public System.DateTime? CreatedTime { get; private set; } - - /// - /// Gets domain expiration timestamp. - /// - [JsonProperty(PropertyName = "properties.expirationTime")] - public System.DateTime? ExpirationTime { get; private set; } - - /// - /// Gets timestamp when the domain was renewed last time. - /// - [JsonProperty(PropertyName = "properties.lastRenewedTime")] - public System.DateTime? LastRenewedTime { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// domain should be automatically renewed; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.autoRenew")] - public bool? AutoRenew { get; set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if Azure can - /// assign this domain to App Service apps; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. This value will be - /// &lt;code&gt;true&lt;/code&gt; if domain - /// registration status is active and - /// it is hosted on name servers Azure has programmatic access to. - /// - [JsonProperty(PropertyName = "properties.readyForDnsRecordManagement")] - public bool? ReadyForDnsRecordManagement { get; private set; } - - /// - /// Gets all hostnames derived from the domain and assigned to Azure - /// resources. - /// - [JsonProperty(PropertyName = "properties.managedHostNames")] - public IList ManagedHostNames { get; private set; } - - /// - /// Gets or sets legal agreement consent. - /// - [JsonProperty(PropertyName = "properties.consent")] - public DomainPurchaseConsent Consent { get; set; } - - /// - /// Gets reasons why domain is not renewable. - /// - [JsonProperty(PropertyName = "properties.domainNotRenewableReasons")] - public IList DomainNotRenewableReasons { get; private set; } - - /// - /// Gets or sets current DNS type. Possible values include: 'AzureDns', - /// 'DefaultDomainRegistrarDns' - /// - [JsonProperty(PropertyName = "properties.dnsType")] - public DnsType? DnsType { get; set; } - - /// - /// Gets or sets azure DNS Zone to use - /// - [JsonProperty(PropertyName = "properties.dnsZoneId")] - public string DnsZoneId { get; set; } - - /// - /// Gets or sets target DNS type (would be used for migration). - /// Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' - /// - [JsonProperty(PropertyName = "properties.targetDnsType")] - public DnsType? TargetDnsType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.authCode")] - public string AuthCode { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (ContactAdmin == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactAdmin"); - } - if (ContactBilling == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactBilling"); - } - if (ContactRegistrant == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactRegistrant"); - } - if (ContactTech == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactTech"); - } - if (Consent == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Consent"); - } - if (ContactAdmin != null) - { - ContactAdmin.Validate(); - } - if (ContactBilling != null) - { - ContactBilling.Validate(); - } - if (ContactRegistrant != null) - { - ContactRegistrant.Validate(); - } - if (ContactTech != null) - { - ContactTech.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainAvailabilityCheckResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainAvailabilityCheckResult.cs deleted file mode 100644 index 42eec84d942e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainAvailabilityCheckResult.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Domain availability check result. - /// - public partial class DomainAvailabilityCheckResult - { - /// - /// Initializes a new instance of the DomainAvailabilityCheckResult - /// class. - /// - public DomainAvailabilityCheckResult() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DomainAvailabilityCheckResult - /// class. - /// - /// Name of the domain. - /// <code>true</code> if domain can - /// be purchased using CreateDomain API; otherwise, - /// <code>false</code>. - /// Valid values are Regular domain: Azure - /// will charge the full price of domain registration, SoftDeleted: - /// Purchasing this domain will simply restore it and this operation - /// will not cost anything. Possible values include: 'Regular', - /// 'SoftDeleted' - public DomainAvailabilityCheckResult(string name = default(string), bool? available = default(bool?), DomainType? domainType = default(DomainType?)) - { - Name = name; - Available = available; - DomainType = domainType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the domain. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// domain can be purchased using CreateDomain API; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "available")] - public bool? Available { get; set; } - - /// - /// Gets or sets valid values are Regular domain: Azure will charge the - /// full price of domain registration, SoftDeleted: Purchasing this - /// domain will simply restore it and this operation will not cost - /// anything. Possible values include: 'Regular', 'SoftDeleted' - /// - [JsonProperty(PropertyName = "domainType")] - public DomainType? DomainType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainControlCenterSsoRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainControlCenterSsoRequest.cs deleted file mode 100644 index 0b2693314b55..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainControlCenterSsoRequest.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Single sign-on request information for domain management. - /// - public partial class DomainControlCenterSsoRequest - { - /// - /// Initializes a new instance of the DomainControlCenterSsoRequest - /// class. - /// - public DomainControlCenterSsoRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DomainControlCenterSsoRequest - /// class. - /// - /// URL where the single sign-on request is to be - /// made. - /// Post parameter key. - /// Post parameter value. Client - /// should use 'application/x-www-form-urlencoded' encoding for this - /// value. - public DomainControlCenterSsoRequest(string url = default(string), string postParameterKey = default(string), string postParameterValue = default(string)) - { - Url = url; - PostParameterKey = postParameterKey; - PostParameterValue = postParameterValue; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets URL where the single sign-on request is to be made. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; private set; } - - /// - /// Gets post parameter key. - /// - [JsonProperty(PropertyName = "postParameterKey")] - public string PostParameterKey { get; private set; } - - /// - /// Gets post parameter value. Client should use - /// 'application/x-www-form-urlencoded' encoding for this value. - /// - [JsonProperty(PropertyName = "postParameterValue")] - public string PostParameterValue { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainOwnershipIdentifier.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainOwnershipIdentifier.cs deleted file mode 100644 index 76577cbd5406..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainOwnershipIdentifier.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Domain ownership Identifier. - /// - [Rest.Serialization.JsonTransformation] - public partial class DomainOwnershipIdentifier : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DomainOwnershipIdentifier class. - /// - public DomainOwnershipIdentifier() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DomainOwnershipIdentifier class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Ownership Id. - public DomainOwnershipIdentifier(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string ownershipId = default(string)) - : base(id, name, kind, type) - { - OwnershipId = ownershipId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets ownership Id. - /// - [JsonProperty(PropertyName = "properties.ownershipId")] - public string OwnershipId { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPatchResource.cs deleted file mode 100644 index c91ad00fac20..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPatchResource.cs +++ /dev/null @@ -1,297 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a domain. - /// - [Rest.Serialization.JsonTransformation] - public partial class DomainPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the DomainPatchResource class. - /// - public DomainPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DomainPatchResource class. - /// - /// Administrative contact. - /// Billing contact. - /// Registrant contact. - /// Technical contact. - /// Legal agreement consent. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Domain registration status. - /// Possible values include: 'Active', 'Awaiting', 'Cancelled', - /// 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', - /// 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', - /// 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', - /// 'JsonConverterFailed' - /// Domain provisioning state. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', - /// 'Deleting' - /// Name servers. - /// <code>true</code> if domain - /// privacy is enabled for this domain; otherwise, - /// <code>false</code>. - /// Domain creation timestamp. - /// Domain expiration timestamp. - /// Timestamp when the domain was renewed - /// last time. - /// <code>true</code> if the domain - /// should be automatically renewed; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// Azure can assign this domain to App Service apps; otherwise, - /// <code>false</code>. This value will be - /// <code>true</code> if domain registration status is - /// active and - /// it is hosted on name servers Azure has programmatic access - /// to. - /// All hostnames derived from the - /// domain and assigned to Azure resources. - /// Reasons why domain is not - /// renewable. - /// Current DNS type. Possible values include: - /// 'AzureDns', 'DefaultDomainRegistrarDns' - /// Azure DNS Zone to use - /// Target DNS type (would be used for - /// migration). Possible values include: 'AzureDns', - /// 'DefaultDomainRegistrarDns' - public DomainPatchResource(Contact contactAdmin, Contact contactBilling, Contact contactRegistrant, Contact contactTech, DomainPurchaseConsent consent, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), DomainStatus? registrationStatus = default(DomainStatus?), ProvisioningState? provisioningState = default(ProvisioningState?), IList nameServers = default(IList), bool? privacy = default(bool?), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), System.DateTime? lastRenewedTime = default(System.DateTime?), bool? autoRenew = default(bool?), bool? readyForDnsRecordManagement = default(bool?), IList managedHostNames = default(IList), IList domainNotRenewableReasons = default(IList), DnsType? dnsType = default(DnsType?), string dnsZoneId = default(string), DnsType? targetDnsType = default(DnsType?), string authCode = default(string)) - : base(id, name, kind, type) - { - ContactAdmin = contactAdmin; - ContactBilling = contactBilling; - ContactRegistrant = contactRegistrant; - ContactTech = contactTech; - RegistrationStatus = registrationStatus; - ProvisioningState = provisioningState; - NameServers = nameServers; - Privacy = privacy; - CreatedTime = createdTime; - ExpirationTime = expirationTime; - LastRenewedTime = lastRenewedTime; - AutoRenew = autoRenew; - ReadyForDnsRecordManagement = readyForDnsRecordManagement; - ManagedHostNames = managedHostNames; - Consent = consent; - DomainNotRenewableReasons = domainNotRenewableReasons; - DnsType = dnsType; - DnsZoneId = dnsZoneId; - TargetDnsType = targetDnsType; - AuthCode = authCode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets administrative contact. - /// - [JsonProperty(PropertyName = "properties.contactAdmin")] - public Contact ContactAdmin { get; set; } - - /// - /// Gets or sets billing contact. - /// - [JsonProperty(PropertyName = "properties.contactBilling")] - public Contact ContactBilling { get; set; } - - /// - /// Gets or sets registrant contact. - /// - [JsonProperty(PropertyName = "properties.contactRegistrant")] - public Contact ContactRegistrant { get; set; } - - /// - /// Gets or sets technical contact. - /// - [JsonProperty(PropertyName = "properties.contactTech")] - public Contact ContactTech { get; set; } - - /// - /// Gets domain registration status. Possible values include: 'Active', - /// 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', - /// 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', - /// 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', - /// 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed' - /// - [JsonProperty(PropertyName = "properties.registrationStatus")] - public DomainStatus? RegistrationStatus { get; private set; } - - /// - /// Gets domain provisioning state. Possible values include: - /// 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public ProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets name servers. - /// - [JsonProperty(PropertyName = "properties.nameServers")] - public IList NameServers { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// domain privacy is enabled for this domain; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.privacy")] - public bool? Privacy { get; set; } - - /// - /// Gets domain creation timestamp. - /// - [JsonProperty(PropertyName = "properties.createdTime")] - public System.DateTime? CreatedTime { get; private set; } - - /// - /// Gets domain expiration timestamp. - /// - [JsonProperty(PropertyName = "properties.expirationTime")] - public System.DateTime? ExpirationTime { get; private set; } - - /// - /// Gets timestamp when the domain was renewed last time. - /// - [JsonProperty(PropertyName = "properties.lastRenewedTime")] - public System.DateTime? LastRenewedTime { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// domain should be automatically renewed; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.autoRenew")] - public bool? AutoRenew { get; set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if Azure can - /// assign this domain to App Service apps; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. This value will be - /// &lt;code&gt;true&lt;/code&gt; if domain - /// registration status is active and - /// it is hosted on name servers Azure has programmatic access to. - /// - [JsonProperty(PropertyName = "properties.readyForDnsRecordManagement")] - public bool? ReadyForDnsRecordManagement { get; private set; } - - /// - /// Gets all hostnames derived from the domain and assigned to Azure - /// resources. - /// - [JsonProperty(PropertyName = "properties.managedHostNames")] - public IList ManagedHostNames { get; private set; } - - /// - /// Gets or sets legal agreement consent. - /// - [JsonProperty(PropertyName = "properties.consent")] - public DomainPurchaseConsent Consent { get; set; } - - /// - /// Gets reasons why domain is not renewable. - /// - [JsonProperty(PropertyName = "properties.domainNotRenewableReasons")] - public IList DomainNotRenewableReasons { get; private set; } - - /// - /// Gets or sets current DNS type. Possible values include: 'AzureDns', - /// 'DefaultDomainRegistrarDns' - /// - [JsonProperty(PropertyName = "properties.dnsType")] - public DnsType? DnsType { get; set; } - - /// - /// Gets or sets azure DNS Zone to use - /// - [JsonProperty(PropertyName = "properties.dnsZoneId")] - public string DnsZoneId { get; set; } - - /// - /// Gets or sets target DNS type (would be used for migration). - /// Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' - /// - [JsonProperty(PropertyName = "properties.targetDnsType")] - public DnsType? TargetDnsType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.authCode")] - public string AuthCode { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ContactAdmin == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactAdmin"); - } - if (ContactBilling == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactBilling"); - } - if (ContactRegistrant == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactRegistrant"); - } - if (ContactTech == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ContactTech"); - } - if (Consent == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Consent"); - } - if (ContactAdmin != null) - { - ContactAdmin.Validate(); - } - if (ContactBilling != null) - { - ContactBilling.Validate(); - } - if (ContactRegistrant != null) - { - ContactRegistrant.Validate(); - } - if (ContactTech != null) - { - ContactTech.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPurchaseConsent.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPurchaseConsent.cs deleted file mode 100644 index 3142541d154d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainPurchaseConsent.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Domain purchase consent object, representing acceptance of applicable - /// legal agreements. - /// - public partial class DomainPurchaseConsent - { - /// - /// Initializes a new instance of the DomainPurchaseConsent class. - /// - public DomainPurchaseConsent() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the DomainPurchaseConsent class. - /// - /// List of applicable legal agreement - /// keys. This list can be retrieved using ListLegalAgreements API - /// under <code>TopLevelDomain</code> resource. - /// Client IP address. - /// Timestamp when the agreements were - /// accepted. - public DomainPurchaseConsent(IList agreementKeys = default(IList), string agreedBy = default(string), System.DateTime? agreedAt = default(System.DateTime?)) - { - AgreementKeys = agreementKeys; - AgreedBy = agreedBy; - AgreedAt = agreedAt; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of applicable legal agreement keys. This list can - /// be retrieved using ListLegalAgreements API under - /// &lt;code&gt;TopLevelDomain&lt;/code&gt; resource. - /// - [JsonProperty(PropertyName = "agreementKeys")] - public IList AgreementKeys { get; set; } - - /// - /// Gets or sets client IP address. - /// - [JsonProperty(PropertyName = "agreedBy")] - public string AgreedBy { get; set; } - - /// - /// Gets or sets timestamp when the agreements were accepted. - /// - [JsonProperty(PropertyName = "agreedAt")] - public System.DateTime? AgreedAt { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainRecommendationSearchParameters.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainRecommendationSearchParameters.cs deleted file mode 100644 index c425a7cfabb5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainRecommendationSearchParameters.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Domain recommendation search parameters. - /// - public partial class DomainRecommendationSearchParameters - { - /// - /// Initializes a new instance of the - /// DomainRecommendationSearchParameters class. - /// - public DomainRecommendationSearchParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// DomainRecommendationSearchParameters class. - /// - /// Keywords to be used for generating domain - /// recommendations. - /// Maximum number of - /// recommendations. - public DomainRecommendationSearchParameters(string keywords = default(string), int? maxDomainRecommendations = default(int?)) - { - Keywords = keywords; - MaxDomainRecommendations = maxDomainRecommendations; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets keywords to be used for generating domain - /// recommendations. - /// - [JsonProperty(PropertyName = "keywords")] - public string Keywords { get; set; } - - /// - /// Gets or sets maximum number of recommendations. - /// - [JsonProperty(PropertyName = "maxDomainRecommendations")] - public int? MaxDomainRecommendations { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainStatus.cs deleted file mode 100644 index d9b9caa8e3cd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainStatus.cs +++ /dev/null @@ -1,174 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for DomainStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DomainStatus - { - [EnumMember(Value = "Active")] - Active, - [EnumMember(Value = "Awaiting")] - Awaiting, - [EnumMember(Value = "Cancelled")] - Cancelled, - [EnumMember(Value = "Confiscated")] - Confiscated, - [EnumMember(Value = "Disabled")] - Disabled, - [EnumMember(Value = "Excluded")] - Excluded, - [EnumMember(Value = "Expired")] - Expired, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Held")] - Held, - [EnumMember(Value = "Locked")] - Locked, - [EnumMember(Value = "Parked")] - Parked, - [EnumMember(Value = "Pending")] - Pending, - [EnumMember(Value = "Reserved")] - Reserved, - [EnumMember(Value = "Reverted")] - Reverted, - [EnumMember(Value = "Suspended")] - Suspended, - [EnumMember(Value = "Transferred")] - Transferred, - [EnumMember(Value = "Unknown")] - Unknown, - [EnumMember(Value = "Unlocked")] - Unlocked, - [EnumMember(Value = "Unparked")] - Unparked, - [EnumMember(Value = "Updated")] - Updated, - [EnumMember(Value = "JsonConverterFailed")] - JsonConverterFailed - } - internal static class DomainStatusEnumExtension - { - internal static string ToSerializedValue(this DomainStatus? value) - { - return value == null ? null : ((DomainStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this DomainStatus value) - { - switch( value ) - { - case DomainStatus.Active: - return "Active"; - case DomainStatus.Awaiting: - return "Awaiting"; - case DomainStatus.Cancelled: - return "Cancelled"; - case DomainStatus.Confiscated: - return "Confiscated"; - case DomainStatus.Disabled: - return "Disabled"; - case DomainStatus.Excluded: - return "Excluded"; - case DomainStatus.Expired: - return "Expired"; - case DomainStatus.Failed: - return "Failed"; - case DomainStatus.Held: - return "Held"; - case DomainStatus.Locked: - return "Locked"; - case DomainStatus.Parked: - return "Parked"; - case DomainStatus.Pending: - return "Pending"; - case DomainStatus.Reserved: - return "Reserved"; - case DomainStatus.Reverted: - return "Reverted"; - case DomainStatus.Suspended: - return "Suspended"; - case DomainStatus.Transferred: - return "Transferred"; - case DomainStatus.Unknown: - return "Unknown"; - case DomainStatus.Unlocked: - return "Unlocked"; - case DomainStatus.Unparked: - return "Unparked"; - case DomainStatus.Updated: - return "Updated"; - case DomainStatus.JsonConverterFailed: - return "JsonConverterFailed"; - } - return null; - } - - internal static DomainStatus? ParseDomainStatus(this string value) - { - switch( value ) - { - case "Active": - return DomainStatus.Active; - case "Awaiting": - return DomainStatus.Awaiting; - case "Cancelled": - return DomainStatus.Cancelled; - case "Confiscated": - return DomainStatus.Confiscated; - case "Disabled": - return DomainStatus.Disabled; - case "Excluded": - return DomainStatus.Excluded; - case "Expired": - return DomainStatus.Expired; - case "Failed": - return DomainStatus.Failed; - case "Held": - return DomainStatus.Held; - case "Locked": - return DomainStatus.Locked; - case "Parked": - return DomainStatus.Parked; - case "Pending": - return DomainStatus.Pending; - case "Reserved": - return DomainStatus.Reserved; - case "Reverted": - return DomainStatus.Reverted; - case "Suspended": - return DomainStatus.Suspended; - case "Transferred": - return DomainStatus.Transferred; - case "Unknown": - return DomainStatus.Unknown; - case "Unlocked": - return DomainStatus.Unlocked; - case "Unparked": - return DomainStatus.Unparked; - case "Updated": - return DomainStatus.Updated; - case "JsonConverterFailed": - return DomainStatus.JsonConverterFailed; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainType.cs deleted file mode 100644 index a3892f6545e3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/DomainType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for DomainType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum DomainType - { - [EnumMember(Value = "Regular")] - Regular, - [EnumMember(Value = "SoftDeleted")] - SoftDeleted - } - internal static class DomainTypeEnumExtension - { - internal static string ToSerializedValue(this DomainType? value) - { - return value == null ? null : ((DomainType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this DomainType value) - { - switch( value ) - { - case DomainType.Regular: - return "Regular"; - case DomainType.SoftDeleted: - return "SoftDeleted"; - } - return null; - } - - internal static DomainType? ParseDomainType(this string value) - { - switch( value ) - { - case "Regular": - return DomainType.Regular; - case "SoftDeleted": - return DomainType.SoftDeleted; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnabledConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnabledConfig.cs deleted file mode 100644 index 787276cb500e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnabledConfig.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Enabled configuration. - /// - public partial class EnabledConfig - { - /// - /// Initializes a new instance of the EnabledConfig class. - /// - public EnabledConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnabledConfig class. - /// - /// True if configuration is enabled, false if it - /// is disabled and null if configuration is not set. - public EnabledConfig(bool? enabled = default(bool?)) - { - Enabled = enabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets true if configuration is enabled, false if it is - /// disabled and null if configuration is not set. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDependency.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDependency.cs deleted file mode 100644 index a5cdde253b60..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDependency.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A domain name that a service is reached at, including details of the - /// current connection status. - /// - public partial class EndpointDependency - { - /// - /// Initializes a new instance of the EndpointDependency class. - /// - public EndpointDependency() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EndpointDependency class. - /// - /// The domain name of the dependency. - /// The IP Addresses and Ports used when - /// connecting to DomainName. - public EndpointDependency(string domainName = default(string), IList endpointDetails = default(IList)) - { - DomainName = domainName; - EndpointDetails = endpointDetails; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the domain name of the dependency. - /// - [JsonProperty(PropertyName = "domainName")] - public string DomainName { get; set; } - - /// - /// Gets or sets the IP Addresses and Ports used when connecting to - /// DomainName. - /// - [JsonProperty(PropertyName = "endpointDetails")] - public IList EndpointDetails { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDetail.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDetail.cs deleted file mode 100644 index 427ffe880862..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EndpointDetail.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Current TCP connectivity information from the App Service Environment - /// to a single endpoint. - /// - public partial class EndpointDetail - { - /// - /// Initializes a new instance of the EndpointDetail class. - /// - public EndpointDetail() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EndpointDetail class. - /// - /// An IP Address that Domain Name currently - /// resolves to. - /// The port an endpoint is connected to. - /// The time in milliseconds it takes for a TCP - /// connection to be created from the App Service Environment to this - /// IpAddress at this Port. - /// Whether it is possible to create a TCP - /// connection from the App Service Environment to this IpAddress at - /// this Port. - public EndpointDetail(string ipAddress = default(string), int? port = default(int?), double? latency = default(double?), bool? isAccessible = default(bool?)) - { - IpAddress = ipAddress; - Port = port; - Latency = latency; - IsAccessible = isAccessible; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets an IP Address that Domain Name currently resolves to. - /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } - - /// - /// Gets or sets the port an endpoint is connected to. - /// - [JsonProperty(PropertyName = "port")] - public int? Port { get; set; } - - /// - /// Gets or sets the time in milliseconds it takes for a TCP connection - /// to be created from the App Service Environment to this IpAddress at - /// this Port. - /// - [JsonProperty(PropertyName = "latency")] - public double? Latency { get; set; } - - /// - /// Gets or sets whether it is possible to create a TCP connection from - /// the App Service Environment to this IpAddress at this Port. - /// - [JsonProperty(PropertyName = "isAccessible")] - public bool? IsAccessible { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs deleted file mode 100644 index 60ae58fea6f1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnterpriseGradeCdnStatus.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for EnterpriseGradeCdnStatus. - /// - public static class EnterpriseGradeCdnStatus - { - public const string Enabled = "Enabled"; - public const string Enabling = "Enabling"; - public const string Disabled = "Disabled"; - public const string Disabling = "Disabling"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs deleted file mode 100644 index 11ec9fd56d63..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/EnvironmentVar.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App container environment variable. - /// - public partial class EnvironmentVar - { - /// - /// Initializes a new instance of the EnvironmentVar class. - /// - public EnvironmentVar() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the EnvironmentVar class. - /// - /// Environment variable name. - /// Non-secret environment variable value. - /// Name of the Container App secret from which - /// to pull the environment variable value. - public EnvironmentVar(string name = default(string), string value = default(string), string secretRef = default(string)) - { - Name = name; - Value = value; - SecretRef = secretRef; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets environment variable name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets non-secret environment variable value. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Gets or sets name of the Container App secret from which to pull - /// the environment variable value. - /// - [JsonProperty(PropertyName = "secretRef")] - public string SecretRef { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs deleted file mode 100644 index 2b2a84aac2bc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ErrorEntity.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Body of the error response returned from the API. - /// - public partial class ErrorEntity - { - /// - /// Initializes a new instance of the ErrorEntity class. - /// - public ErrorEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ErrorEntity class. - /// - /// Type of error. - /// Message template. - /// Parameters for the template. - /// Inner errors. - /// Error Details. - /// The error target. - /// Basic error code. - /// Any details of the error. - public ErrorEntity(string extendedCode = default(string), string messageTemplate = default(string), IList parameters = default(IList), IList innerErrors = default(IList), IList details = default(IList), string target = default(string), string code = default(string), string message = default(string)) - { - ExtendedCode = extendedCode; - MessageTemplate = messageTemplate; - Parameters = parameters; - InnerErrors = innerErrors; - Details = details; - Target = target; - Code = code; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of error. - /// - [JsonProperty(PropertyName = "extendedCode")] - public string ExtendedCode { get; set; } - - /// - /// Gets or sets message template. - /// - [JsonProperty(PropertyName = "messageTemplate")] - public string MessageTemplate { get; set; } - - /// - /// Gets or sets parameters for the template. - /// - [JsonProperty(PropertyName = "parameters")] - public IList Parameters { get; set; } - - /// - /// Gets or sets inner errors. - /// - [JsonProperty(PropertyName = "innerErrors")] - public IList InnerErrors { get; set; } - - /// - /// Gets or sets error Details. - /// - [JsonProperty(PropertyName = "details")] - public IList Details { get; set; } - - /// - /// Gets or sets the error target. - /// - [JsonProperty(PropertyName = "target")] - public string Target { get; set; } - - /// - /// Gets or sets basic error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets or sets any details of the error. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Experiments.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Experiments.cs deleted file mode 100644 index 291d41df9dbc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Experiments.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Routing rules in production experiments. - /// - public partial class Experiments - { - /// - /// Initializes a new instance of the Experiments class. - /// - public Experiments() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Experiments class. - /// - /// List of ramp-up rules. - public Experiments(IList rampUpRules = default(IList)) - { - RampUpRules = rampUpRules; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of ramp-up rules. - /// - [JsonProperty(PropertyName = "rampUpRules")] - public IList RampUpRules { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs deleted file mode 100644 index 3fa0e6d091ef..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ExtendedLocation.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Extended Location. - /// - public partial class ExtendedLocation - { - /// - /// Initializes a new instance of the ExtendedLocation class. - /// - public ExtendedLocation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ExtendedLocation class. - /// - /// Name of extended location. - /// Type of extended location. - public ExtendedLocation(string name = default(string), string type = default(string)) - { - Name = name; - Type = type; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of extended location. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets type of extended location. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs deleted file mode 100644 index 69d8edcdb57f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Facebook.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Facebook provider. - /// - public partial class Facebook - { - /// - /// Initializes a new instance of the Facebook class. - /// - public Facebook() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Facebook class. - /// - /// <code>false</code> if the - /// Facebook provider should not be enabled despite the set - /// registration; otherwise, <code>true</code>. - /// The configuration settings of the app - /// registration for the Facebook provider. - /// The version of the Facebook api to be - /// used while logging in. - /// The configuration settings of the login - /// flow. - public Facebook(bool? enabled = default(bool?), AppRegistration registration = default(AppRegistration), string graphApiVersion = default(string), LoginScopes login = default(LoginScopes)) - { - Enabled = enabled; - Registration = registration; - GraphApiVersion = graphApiVersion; - Login = login; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Facebook provider should not be enabled despite the set - /// registration; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the Facebook provider. - /// - [JsonProperty(PropertyName = "registration")] - public AppRegistration Registration { get; set; } - - /// - /// Gets or sets the version of the Facebook api to be used while - /// logging in. - /// - [JsonProperty(PropertyName = "graphApiVersion")] - public string GraphApiVersion { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow. - /// - [JsonProperty(PropertyName = "login")] - public LoginScopes Login { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemApplicationLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemApplicationLogsConfig.cs deleted file mode 100644 index 2146691d95fd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemApplicationLogsConfig.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Application logs to file system configuration. - /// - public partial class FileSystemApplicationLogsConfig - { - /// - /// Initializes a new instance of the FileSystemApplicationLogsConfig - /// class. - /// - public FileSystemApplicationLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FileSystemApplicationLogsConfig - /// class. - /// - /// Log level. Possible values include: 'Off', - /// 'Verbose', 'Information', 'Warning', 'Error' - public FileSystemApplicationLogsConfig(LogLevel? level = default(LogLevel?)) - { - Level = level; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets log level. Possible values include: 'Off', 'Verbose', - /// 'Information', 'Warning', 'Error' - /// - [JsonProperty(PropertyName = "level")] - public LogLevel? Level { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemHttpLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemHttpLogsConfig.cs deleted file mode 100644 index 67c7356df574..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemHttpLogsConfig.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Http logs to file system configuration. - /// - public partial class FileSystemHttpLogsConfig - { - /// - /// Initializes a new instance of the FileSystemHttpLogsConfig class. - /// - public FileSystemHttpLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FileSystemHttpLogsConfig class. - /// - /// Maximum size in megabytes that http log - /// files can use. - /// When reached old log files will be removed to make space for new - /// ones. - /// Value can range between 25 and 100. - /// Retention in days. - /// Remove files older than X days. - /// 0 or lower means no retention. - /// True if configuration is enabled, false if it - /// is disabled and null if configuration is not set. - public FileSystemHttpLogsConfig(int? retentionInMb = default(int?), int? retentionInDays = default(int?), bool? enabled = default(bool?)) - { - RetentionInMb = retentionInMb; - RetentionInDays = retentionInDays; - Enabled = enabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets maximum size in megabytes that http log files can use. - /// When reached old log files will be removed to make space for new - /// ones. - /// Value can range between 25 and 100. - /// - [JsonProperty(PropertyName = "retentionInMb")] - public int? RetentionInMb { get; set; } - - /// - /// Gets or sets retention in days. - /// Remove files older than X days. - /// 0 or lower means no retention. - /// - [JsonProperty(PropertyName = "retentionInDays")] - public int? RetentionInDays { get; set; } - - /// - /// Gets or sets true if configuration is enabled, false if it is - /// disabled and null if configuration is not set. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (RetentionInMb > 100) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "RetentionInMb", 100); - } - if (RetentionInMb < 25) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "RetentionInMb", 25); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs deleted file mode 100644 index 9615258c10d5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FileSystemTokenStore.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the storage of the tokens if a file - /// system is used. - /// - public partial class FileSystemTokenStore - { - /// - /// Initializes a new instance of the FileSystemTokenStore class. - /// - public FileSystemTokenStore() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FileSystemTokenStore class. - /// - /// The directory in which the tokens will be - /// stored. - public FileSystemTokenStore(string directory = default(string)) - { - Directory = directory; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the directory in which the tokens will be stored. - /// - [JsonProperty(PropertyName = "directory")] - public string Directory { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs deleted file mode 100644 index 337f4b4b21b6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxy.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of a forward proxy used to make the - /// requests. - /// - public partial class ForwardProxy - { - /// - /// Initializes a new instance of the ForwardProxy class. - /// - public ForwardProxy() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ForwardProxy class. - /// - /// The convention used to determine the url - /// of the request made. Possible values include: 'NoProxy', - /// 'Standard', 'Custom' - /// The name of the header - /// containing the host of the request. - /// The name of the header - /// containing the scheme of the request. - public ForwardProxy(ForwardProxyConvention? convention = default(ForwardProxyConvention?), string customHostHeaderName = default(string), string customProtoHeaderName = default(string)) - { - Convention = convention; - CustomHostHeaderName = customHostHeaderName; - CustomProtoHeaderName = customProtoHeaderName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the convention used to determine the url of the - /// request made. Possible values include: 'NoProxy', 'Standard', - /// 'Custom' - /// - [JsonProperty(PropertyName = "convention")] - public ForwardProxyConvention? Convention { get; set; } - - /// - /// Gets or sets the name of the header containing the host of the - /// request. - /// - [JsonProperty(PropertyName = "customHostHeaderName")] - public string CustomHostHeaderName { get; set; } - - /// - /// Gets or sets the name of the header containing the scheme of the - /// request. - /// - [JsonProperty(PropertyName = "customProtoHeaderName")] - public string CustomProtoHeaderName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxyConvention.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxyConvention.cs deleted file mode 100644 index 2f44e3cd8e45..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ForwardProxyConvention.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ForwardProxyConvention. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ForwardProxyConvention - { - [EnumMember(Value = "NoProxy")] - NoProxy, - [EnumMember(Value = "Standard")] - Standard, - [EnumMember(Value = "Custom")] - Custom - } - internal static class ForwardProxyConventionEnumExtension - { - internal static string ToSerializedValue(this ForwardProxyConvention? value) - { - return value == null ? null : ((ForwardProxyConvention)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ForwardProxyConvention value) - { - switch( value ) - { - case ForwardProxyConvention.NoProxy: - return "NoProxy"; - case ForwardProxyConvention.Standard: - return "Standard"; - case ForwardProxyConvention.Custom: - return "Custom"; - } - return null; - } - - internal static ForwardProxyConvention? ParseForwardProxyConvention(this string value) - { - switch( value ) - { - case "NoProxy": - return ForwardProxyConvention.NoProxy; - case "Standard": - return ForwardProxyConvention.Standard; - case "Custom": - return ForwardProxyConvention.Custom; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrequencyUnit.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrequencyUnit.cs deleted file mode 100644 index ad2b69d824cd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrequencyUnit.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for FrequencyUnit. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FrequencyUnit - { - [EnumMember(Value = "Day")] - Day, - [EnumMember(Value = "Hour")] - Hour - } - internal static class FrequencyUnitEnumExtension - { - internal static string ToSerializedValue(this FrequencyUnit? value) - { - return value == null ? null : ((FrequencyUnit)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this FrequencyUnit value) - { - switch( value ) - { - case FrequencyUnit.Day: - return "Day"; - case FrequencyUnit.Hour: - return "Hour"; - } - return null; - } - - internal static FrequencyUnit? ParseFrequencyUnit(this string value) - { - switch( value ) - { - case "Day": - return FrequencyUnit.Day; - case "Hour": - return FrequencyUnit.Hour; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs deleted file mode 100644 index 0f851ec956af..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndConfiguration.cs +++ /dev/null @@ -1,49 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class FrontEndConfiguration - { - /// - /// Initializes a new instance of the FrontEndConfiguration class. - /// - public FrontEndConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FrontEndConfiguration class. - /// - /// Possible values include: 'NodePort', - /// 'LoadBalancer' - public FrontEndConfiguration(FrontEndServiceType? kind = default(FrontEndServiceType?)) - { - Kind = kind; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets possible values include: 'NodePort', 'LoadBalancer' - /// - [JsonProperty(PropertyName = "kind")] - public FrontEndServiceType? Kind { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs deleted file mode 100644 index b89583e73855..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FrontEndServiceType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for FrontEndServiceType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum FrontEndServiceType - { - [EnumMember(Value = "NodePort")] - NodePort, - [EnumMember(Value = "LoadBalancer")] - LoadBalancer - } - internal static class FrontEndServiceTypeEnumExtension - { - internal static string ToSerializedValue(this FrontEndServiceType? value) - { - return value == null ? null : ((FrontEndServiceType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this FrontEndServiceType value) - { - switch( value ) - { - case FrontEndServiceType.NodePort: - return "NodePort"; - case FrontEndServiceType.LoadBalancer: - return "LoadBalancer"; - } - return null; - } - - internal static FrontEndServiceType? ParseFrontEndServiceType(this string value) - { - switch( value ) - { - case "NodePort": - return FrontEndServiceType.NodePort; - case "LoadBalancer": - return FrontEndServiceType.LoadBalancer; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FtpsState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FtpsState.cs deleted file mode 100644 index 481d92f38573..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FtpsState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for FtpsState. - /// - public static class FtpsState - { - public const string AllAllowed = "AllAllowed"; - public const string FtpsOnly = "FtpsOnly"; - public const string Disabled = "Disabled"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs deleted file mode 100644 index 8dee701ca524..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMajorVersion.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Function App stack major version. - /// - public partial class FunctionAppMajorVersion - { - /// - /// Initializes a new instance of the FunctionAppMajorVersion class. - /// - public FunctionAppMajorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionAppMajorVersion class. - /// - /// Function App stack major version (display - /// only). - /// Function App stack major version name. - /// Minor versions associated with the - /// major version. - public FunctionAppMajorVersion(string displayText = default(string), string value = default(string), IList minorVersions = default(IList)) - { - DisplayText = displayText; - Value = value; - MinorVersions = minorVersions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets function App stack major version (display only). - /// - [JsonProperty(PropertyName = "displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets function App stack major version name. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; private set; } - - /// - /// Gets minor versions associated with the major version. - /// - [JsonProperty(PropertyName = "minorVersions")] - public IList MinorVersions { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs deleted file mode 100644 index bf288f1db6fc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppMinorVersion.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Function App stack minor version. - /// - public partial class FunctionAppMinorVersion - { - /// - /// Initializes a new instance of the FunctionAppMinorVersion class. - /// - public FunctionAppMinorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionAppMinorVersion class. - /// - /// Function App stack (display - /// only). - /// Function App stack name. - /// Settings associated with the minor - /// version. - public FunctionAppMinorVersion(string displayText = default(string), string value = default(string), FunctionAppRuntimes stackSettings = default(FunctionAppRuntimes)) - { - DisplayText = displayText; - Value = value; - StackSettings = stackSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets function App stack (display only). - /// - [JsonProperty(PropertyName = "displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets function App stack name. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; private set; } - - /// - /// Gets settings associated with the minor version. - /// - [JsonProperty(PropertyName = "stackSettings")] - public FunctionAppRuntimes StackSettings { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs deleted file mode 100644 index 9077c3cdc7bc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimeSettings.cs +++ /dev/null @@ -1,193 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Function App runtime settings. - /// - public partial class FunctionAppRuntimeSettings - { - /// - /// Initializes a new instance of the FunctionAppRuntimeSettings class. - /// - public FunctionAppRuntimeSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionAppRuntimeSettings class. - /// - /// Function App stack minor version - /// (runtime only). - /// <code>true</code> if - /// remote debugging is supported for the stack; otherwise, - /// <code>false</code>. - /// Application Insights settings - /// associated with the minor version. - /// GitHub Actions settings - /// associated with the minor version. - /// Application settings associated - /// with the minor version. - /// Configuration settings - /// associated with the minor version. - /// List of supported - /// Functions extension versions. - /// <code>true</code> if the stack - /// is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the - /// stack is deprecated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the stack - /// should be hidden; otherwise, - /// <code>false</code>. - /// End-of-life date for the minor - /// version. - /// <code>true</code> if the - /// stack version is auto-updated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the - /// minor version is early-access; otherwise, - /// <code>false</code>. - /// <code>true</code> if the minor - /// version the default; otherwise, - /// <code>false</code>. - public FunctionAppRuntimeSettings(string runtimeVersion = default(string), bool? remoteDebuggingSupported = default(bool?), AppInsightsWebAppStackSettings appInsightsSettings = default(AppInsightsWebAppStackSettings), GitHubActionWebAppStackSettings gitHubActionSettings = default(GitHubActionWebAppStackSettings), IDictionary appSettingsDictionary = default(IDictionary), SiteConfigPropertiesDictionary siteConfigPropertiesDictionary = default(SiteConfigPropertiesDictionary), IList supportedFunctionsExtensionVersions = default(IList), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?), bool? isDefault = default(bool?)) - { - RuntimeVersion = runtimeVersion; - RemoteDebuggingSupported = remoteDebuggingSupported; - AppInsightsSettings = appInsightsSettings; - GitHubActionSettings = gitHubActionSettings; - AppSettingsDictionary = appSettingsDictionary; - SiteConfigPropertiesDictionary = siteConfigPropertiesDictionary; - SupportedFunctionsExtensionVersions = supportedFunctionsExtensionVersions; - IsPreview = isPreview; - IsDeprecated = isDeprecated; - IsHidden = isHidden; - EndOfLifeDate = endOfLifeDate; - IsAutoUpdate = isAutoUpdate; - IsEarlyAccess = isEarlyAccess; - IsDefault = isDefault; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets function App stack minor version (runtime only). - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if remote - /// debugging is supported for the stack; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "remoteDebuggingSupported")] - public bool? RemoteDebuggingSupported { get; private set; } - - /// - /// Gets application Insights settings associated with the minor - /// version. - /// - [JsonProperty(PropertyName = "appInsightsSettings")] - public AppInsightsWebAppStackSettings AppInsightsSettings { get; private set; } - - /// - /// Gets gitHub Actions settings associated with the minor version. - /// - [JsonProperty(PropertyName = "gitHubActionSettings")] - public GitHubActionWebAppStackSettings GitHubActionSettings { get; private set; } - - /// - /// Gets application settings associated with the minor version. - /// - [JsonProperty(PropertyName = "appSettingsDictionary")] - public IDictionary AppSettingsDictionary { get; private set; } - - /// - /// Gets configuration settings associated with the minor version. - /// - [JsonProperty(PropertyName = "siteConfigPropertiesDictionary")] - public SiteConfigPropertiesDictionary SiteConfigPropertiesDictionary { get; private set; } - - /// - /// Gets list of supported Functions extension versions. - /// - [JsonProperty(PropertyName = "supportedFunctionsExtensionVersions")] - public IList SupportedFunctionsExtensionVersions { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// in preview; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public bool? IsDeprecated { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// should be hidden; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isHidden")] - public bool? IsHidden { get; private set; } - - /// - /// Gets end-of-life date for the minor version. - /// - [JsonProperty(PropertyName = "endOfLifeDate")] - public System.DateTime? EndOfLifeDate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// version is auto-updated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isAutoUpdate")] - public bool? IsAutoUpdate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the minor - /// version is early-access; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isEarlyAccess")] - public bool? IsEarlyAccess { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the minor - /// version the default; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDefault")] - public bool? IsDefault { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs deleted file mode 100644 index eab82eef40de..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppRuntimes.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Function App stack runtimes. - /// - public partial class FunctionAppRuntimes - { - /// - /// Initializes a new instance of the FunctionAppRuntimes class. - /// - public FunctionAppRuntimes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionAppRuntimes class. - /// - /// Linux-specific settings - /// associated with the minor version. - /// Windows-specific settings - /// associated with the minor version. - public FunctionAppRuntimes(FunctionAppRuntimeSettings linuxRuntimeSettings = default(FunctionAppRuntimeSettings), FunctionAppRuntimeSettings windowsRuntimeSettings = default(FunctionAppRuntimeSettings)) - { - LinuxRuntimeSettings = linuxRuntimeSettings; - WindowsRuntimeSettings = windowsRuntimeSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets linux-specific settings associated with the minor version. - /// - [JsonProperty(PropertyName = "linuxRuntimeSettings")] - public FunctionAppRuntimeSettings LinuxRuntimeSettings { get; private set; } - - /// - /// Gets windows-specific settings associated with the minor version. - /// - [JsonProperty(PropertyName = "windowsRuntimeSettings")] - public FunctionAppRuntimeSettings WindowsRuntimeSettings { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs deleted file mode 100644 index 542801585fbf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionAppStack.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Function App Stack. - /// - [Rest.Serialization.JsonTransformation] - public partial class FunctionAppStack : ProxyOnlyResource - { - /// - /// Initializes a new instance of the FunctionAppStack class. - /// - public FunctionAppStack() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionAppStack class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Function App stack location. - /// Function App stack (display - /// only). - /// Function App stack name. - /// List of major versions - /// available. - /// Function App stack preferred OS. Possible - /// values include: 'Windows', 'Linux' - public FunctionAppStack(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string location = default(string), string displayText = default(string), string value = default(string), IList majorVersions = default(IList), StackPreferredOs? preferredOs = default(StackPreferredOs?)) - : base(id, name, kind, type) - { - Location = location; - DisplayText = displayText; - Value = value; - MajorVersions = majorVersions; - PreferredOs = preferredOs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets function App stack location. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; private set; } - - /// - /// Gets function App stack (display only). - /// - [JsonProperty(PropertyName = "properties.displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets function App stack name. - /// - [JsonProperty(PropertyName = "properties.value")] - public string Value { get; private set; } - - /// - /// Gets list of major versions available. - /// - [JsonProperty(PropertyName = "properties.majorVersions")] - public IList MajorVersions { get; private set; } - - /// - /// Gets function App stack preferred OS. Possible values include: - /// 'Windows', 'Linux' - /// - [JsonProperty(PropertyName = "properties.preferredOs")] - public StackPreferredOs? PreferredOs { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionEnvelope.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionEnvelope.cs deleted file mode 100644 index 0e0627a92be9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionEnvelope.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Function information. - /// - [Rest.Serialization.JsonTransformation] - public partial class FunctionEnvelope : ProxyOnlyResource - { - /// - /// Initializes a new instance of the FunctionEnvelope class. - /// - public FunctionEnvelope() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionEnvelope class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Function App ID. - /// Script root path URI. - /// Script URI. - /// Config URI. - /// Test data URI. - /// Secrets file URI. - /// Function URI. - /// Config information. - /// File list. - /// Test data used when testing via the Azure - /// Portal. - /// The invocation URL - /// The function language - /// Gets or sets a value indicating whether - /// the function is disabled - public FunctionEnvelope(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionAppId = default(string), string scriptRootPathHref = default(string), string scriptHref = default(string), string configHref = default(string), string testDataHref = default(string), string secretsFileHref = default(string), string href = default(string), object config = default(object), IDictionary files = default(IDictionary), string testData = default(string), string invokeUrlTemplate = default(string), string language = default(string), bool? isDisabled = default(bool?)) - : base(id, name, kind, type) - { - FunctionAppId = functionAppId; - ScriptRootPathHref = scriptRootPathHref; - ScriptHref = scriptHref; - ConfigHref = configHref; - TestDataHref = testDataHref; - SecretsFileHref = secretsFileHref; - Href = href; - Config = config; - Files = files; - TestData = testData; - InvokeUrlTemplate = invokeUrlTemplate; - Language = language; - IsDisabled = isDisabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets function App ID. - /// - [JsonProperty(PropertyName = "properties.function_app_id")] - public string FunctionAppId { get; set; } - - /// - /// Gets or sets script root path URI. - /// - [JsonProperty(PropertyName = "properties.script_root_path_href")] - public string ScriptRootPathHref { get; set; } - - /// - /// Gets or sets script URI. - /// - [JsonProperty(PropertyName = "properties.script_href")] - public string ScriptHref { get; set; } - - /// - /// Gets or sets config URI. - /// - [JsonProperty(PropertyName = "properties.config_href")] - public string ConfigHref { get; set; } - - /// - /// Gets or sets test data URI. - /// - [JsonProperty(PropertyName = "properties.test_data_href")] - public string TestDataHref { get; set; } - - /// - /// Gets or sets secrets file URI. - /// - [JsonProperty(PropertyName = "properties.secrets_file_href")] - public string SecretsFileHref { get; set; } - - /// - /// Gets or sets function URI. - /// - [JsonProperty(PropertyName = "properties.href")] - public string Href { get; set; } - - /// - /// Gets or sets config information. - /// - [JsonProperty(PropertyName = "properties.config")] - public object Config { get; set; } - - /// - /// Gets or sets file list. - /// - [JsonProperty(PropertyName = "properties.files")] - public IDictionary Files { get; set; } - - /// - /// Gets or sets test data used when testing via the Azure Portal. - /// - [JsonProperty(PropertyName = "properties.test_data")] - public string TestData { get; set; } - - /// - /// Gets or sets the invocation URL - /// - [JsonProperty(PropertyName = "properties.invoke_url_template")] - public string InvokeUrlTemplate { get; set; } - - /// - /// Gets or sets the function language - /// - [JsonProperty(PropertyName = "properties.language")] - public string Language { get; set; } - - /// - /// Gets or sets a value indicating whether the function is disabled - /// - [JsonProperty(PropertyName = "properties.isDisabled")] - public bool? IsDisabled { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionSecrets.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionSecrets.cs deleted file mode 100644 index 402dfca0c929..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/FunctionSecrets.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Function secrets. - /// - public partial class FunctionSecrets - { - /// - /// Initializes a new instance of the FunctionSecrets class. - /// - public FunctionSecrets() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the FunctionSecrets class. - /// - /// Secret key. - /// Trigger URL. - public FunctionSecrets(string key = default(string), string triggerUrl = default(string)) - { - Key = key; - TriggerUrl = triggerUrl; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets secret key. - /// - [JsonProperty(PropertyName = "key")] - public string Key { get; set; } - - /// - /// Gets or sets trigger URL. - /// - [JsonProperty(PropertyName = "trigger_url")] - public string TriggerUrl { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GeoRegion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GeoRegion.cs deleted file mode 100644 index e39413ff64dd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GeoRegion.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Geographical region. - /// - [Rest.Serialization.JsonTransformation] - public partial class GeoRegion : ProxyOnlyResource - { - /// - /// Initializes a new instance of the GeoRegion class. - /// - public GeoRegion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GeoRegion class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Region description. - /// Display name for region. - /// Display name for region. - public GeoRegion(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string description = default(string), string displayName = default(string), string orgDomain = default(string)) - : base(id, name, kind, type) - { - Description = description; - DisplayName = displayName; - OrgDomain = orgDomain; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets region description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - /// - /// Gets display name for region. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets display name for region. - /// - [JsonProperty(PropertyName = "properties.orgDomain")] - public string OrgDomain { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs deleted file mode 100644 index dce8ae3cddcd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHub.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the GitHub provider. - /// - public partial class GitHub - { - /// - /// Initializes a new instance of the GitHub class. - /// - public GitHub() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GitHub class. - /// - /// <code>false</code> if the GitHub - /// provider should not be enabled despite the set registration; - /// otherwise, <code>true</code>. - /// The configuration settings of the app - /// registration for the GitHub provider. - /// The configuration settings of the login - /// flow. - public GitHub(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes)) - { - Enabled = enabled; - Registration = registration; - Login = login; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// GitHub provider should not be enabled despite the set registration; - /// otherwise, &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the GitHub provider. - /// - [JsonProperty(PropertyName = "registration")] - public ClientRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow. - /// - [JsonProperty(PropertyName = "login")] - public LoginScopes Login { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs deleted file mode 100644 index 6db239e1d461..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionCodeConfiguration.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The GitHub action code configuration. - /// - public partial class GitHubActionCodeConfiguration - { - /// - /// Initializes a new instance of the GitHubActionCodeConfiguration - /// class. - /// - public GitHubActionCodeConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GitHubActionCodeConfiguration - /// class. - /// - /// Runtime stack is used to determine the - /// workflow file content for code base apps. - /// Runtime version is used to determine - /// what build version to set in the workflow file. - public GitHubActionCodeConfiguration(string runtimeStack = default(string), string runtimeVersion = default(string)) - { - RuntimeStack = runtimeStack; - RuntimeVersion = runtimeVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets runtime stack is used to determine the workflow file - /// content for code base apps. - /// - [JsonProperty(PropertyName = "runtimeStack")] - public string RuntimeStack { get; set; } - - /// - /// Gets or sets runtime version is used to determine what build - /// version to set in the workflow file. - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs deleted file mode 100644 index 80fbadc40478..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionConfiguration.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The GitHub action configuration. - /// - public partial class GitHubActionConfiguration - { - /// - /// Initializes a new instance of the GitHubActionConfiguration class. - /// - public GitHubActionConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GitHubActionConfiguration class. - /// - /// GitHub Action code - /// configuration. - /// GitHub Action container - /// configuration. - /// This will help determine the workflow - /// configuration to select. - /// Workflow option to determine - /// whether the workflow file should be generated and written to the - /// repository. - public GitHubActionConfiguration(GitHubActionCodeConfiguration codeConfiguration = default(GitHubActionCodeConfiguration), GitHubActionContainerConfiguration containerConfiguration = default(GitHubActionContainerConfiguration), bool? isLinux = default(bool?), bool? generateWorkflowFile = default(bool?)) - { - CodeConfiguration = codeConfiguration; - ContainerConfiguration = containerConfiguration; - IsLinux = isLinux; - GenerateWorkflowFile = generateWorkflowFile; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets gitHub Action code configuration. - /// - [JsonProperty(PropertyName = "codeConfiguration")] - public GitHubActionCodeConfiguration CodeConfiguration { get; set; } - - /// - /// Gets or sets gitHub Action container configuration. - /// - [JsonProperty(PropertyName = "containerConfiguration")] - public GitHubActionContainerConfiguration ContainerConfiguration { get; set; } - - /// - /// Gets or sets this will help determine the workflow configuration to - /// select. - /// - [JsonProperty(PropertyName = "isLinux")] - public bool? IsLinux { get; set; } - - /// - /// Gets or sets workflow option to determine whether the workflow file - /// should be generated and written to the repository. - /// - [JsonProperty(PropertyName = "generateWorkflowFile")] - public bool? GenerateWorkflowFile { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs deleted file mode 100644 index 07b4058844c6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionContainerConfiguration.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The GitHub action container configuration. - /// - public partial class GitHubActionContainerConfiguration - { - /// - /// Initializes a new instance of the - /// GitHubActionContainerConfiguration class. - /// - public GitHubActionContainerConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// GitHubActionContainerConfiguration class. - /// - /// The server URL for the container registry - /// where the build will be hosted. - /// The image name for the build. - /// The username used to upload the image to the - /// container registry. - /// The password used to upload the image to the - /// container registry. - public GitHubActionContainerConfiguration(string serverUrl = default(string), string imageName = default(string), string username = default(string), string password = default(string)) - { - ServerUrl = serverUrl; - ImageName = imageName; - Username = username; - Password = password; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the server URL for the container registry where the - /// build will be hosted. - /// - [JsonProperty(PropertyName = "serverUrl")] - public string ServerUrl { get; set; } - - /// - /// Gets or sets the image name for the build. - /// - [JsonProperty(PropertyName = "imageName")] - public string ImageName { get; set; } - - /// - /// Gets or sets the username used to upload the image to the container - /// registry. - /// - [JsonProperty(PropertyName = "username")] - public string Username { get; set; } - - /// - /// Gets or sets the password used to upload the image to the container - /// registry. - /// - [JsonProperty(PropertyName = "password")] - public string Password { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs deleted file mode 100644 index 6a49283cffe7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GitHubActionWebAppStackSettings.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// GitHub Actions Web App stack settings. - /// - public partial class GitHubActionWebAppStackSettings - { - /// - /// Initializes a new instance of the GitHubActionWebAppStackSettings - /// class. - /// - public GitHubActionWebAppStackSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GitHubActionWebAppStackSettings - /// class. - /// - /// <code>true</code> if GitHub - /// Actions is supported for the stack; otherwise, - /// <code>false</code>. - /// The minor version that is supported - /// for GitHub Actions. - public GitHubActionWebAppStackSettings(bool? isSupported = default(bool?), string supportedVersion = default(string)) - { - IsSupported = isSupported; - SupportedVersion = supportedVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if GitHub - /// Actions is supported for the stack; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isSupported")] - public bool? IsSupported { get; private set; } - - /// - /// Gets the minor version that is supported for GitHub Actions. - /// - [JsonProperty(PropertyName = "supportedVersion")] - public string SupportedVersion { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalCsmSkuDescription.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalCsmSkuDescription.cs deleted file mode 100644 index bc1db434b848..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalCsmSkuDescription.cs +++ /dev/null @@ -1,104 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A Global SKU Description. - /// - public partial class GlobalCsmSkuDescription - { - /// - /// Initializes a new instance of the GlobalCsmSkuDescription class. - /// - public GlobalCsmSkuDescription() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GlobalCsmSkuDescription class. - /// - /// Name of the resource SKU. - /// Service Tier of the resource SKU. - /// Size specifier of the resource SKU. - /// Family code of the resource SKU. - /// Min, max, and default scale values of the - /// SKU. - /// Locations of the SKU. - /// Capabilities of the SKU, e.g., is - /// traffic manager enabled? - public GlobalCsmSkuDescription(string name = default(string), string tier = default(string), string size = default(string), string family = default(string), SkuCapacity capacity = default(SkuCapacity), IList locations = default(IList), IList capabilities = default(IList)) - { - Name = name; - Tier = tier; - Size = size; - Family = family; - Capacity = capacity; - Locations = locations; - Capabilities = capabilities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the resource SKU. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets service Tier of the resource SKU. - /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } - - /// - /// Gets or sets size specifier of the resource SKU. - /// - [JsonProperty(PropertyName = "size")] - public string Size { get; set; } - - /// - /// Gets or sets family code of the resource SKU. - /// - [JsonProperty(PropertyName = "family")] - public string Family { get; set; } - - /// - /// Gets or sets min, max, and default scale values of the SKU. - /// - [JsonProperty(PropertyName = "capacity")] - public SkuCapacity Capacity { get; set; } - - /// - /// Gets or sets locations of the SKU. - /// - [JsonProperty(PropertyName = "locations")] - public IList Locations { get; set; } - - /// - /// Gets or sets capabilities of the SKU, e.g., is traffic manager - /// enabled? - /// - [JsonProperty(PropertyName = "capabilities")] - public IList Capabilities { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs deleted file mode 100644 index 65a1db2c3259..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/GlobalValidation.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings that determines the validation flow of users - /// using App Service Authentication/Authorization. - /// - public partial class GlobalValidation - { - /// - /// Initializes a new instance of the GlobalValidation class. - /// - public GlobalValidation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the GlobalValidation class. - /// - /// <code>true</code> - /// if the authentication flow is required any request is made; - /// otherwise, <code>false</code>. - /// The action to take when - /// an unauthenticated client attempts to access the app. Possible - /// values include: 'RedirectToLoginPage', 'AllowAnonymous', - /// 'Return401', 'Return403' - /// The default authentication - /// provider to use when multiple providers are configured. - /// This setting is only needed if multiple providers are configured - /// and the unauthenticated client - /// action is set to "RedirectToLoginPage". - /// The paths for which unauthenticated - /// flow would not be redirected to the login page. - public GlobalValidation(bool? requireAuthentication = default(bool?), UnauthenticatedClientActionV2? unauthenticatedClientAction = default(UnauthenticatedClientActionV2?), string redirectToProvider = default(string), IList excludedPaths = default(IList)) - { - RequireAuthentication = requireAuthentication; - UnauthenticatedClientAction = unauthenticatedClientAction; - RedirectToProvider = redirectToProvider; - ExcludedPaths = excludedPaths; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// authentication flow is required any request is made; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "requireAuthentication")] - public bool? RequireAuthentication { get; set; } - - /// - /// Gets or sets the action to take when an unauthenticated client - /// attempts to access the app. Possible values include: - /// 'RedirectToLoginPage', 'AllowAnonymous', 'Return401', 'Return403' - /// - [JsonProperty(PropertyName = "unauthenticatedClientAction")] - public UnauthenticatedClientActionV2? UnauthenticatedClientAction { get; set; } - - /// - /// Gets or sets the default authentication provider to use when - /// multiple providers are configured. - /// This setting is only needed if multiple providers are configured - /// and the unauthenticated client - /// action is set to "RedirectToLoginPage". - /// - [JsonProperty(PropertyName = "redirectToProvider")] - public string RedirectToProvider { get; set; } - - /// - /// Gets or sets the paths for which unauthenticated flow would not be - /// redirected to the login page. - /// - [JsonProperty(PropertyName = "excludedPaths")] - public IList ExcludedPaths { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs deleted file mode 100644 index b5312ed9d315..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Google.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Google provider. - /// - public partial class Google - { - /// - /// Initializes a new instance of the Google class. - /// - public Google() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Google class. - /// - /// <code>false</code> if the Google - /// provider should not be enabled despite the set registration; - /// otherwise, <code>true</code>. - /// The configuration settings of the app - /// registration for the Google provider. - /// The configuration settings of the login - /// flow. - /// The configuration settings of the Azure - /// Active Directory token validation flow. - public Google(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) - { - Enabled = enabled; - Registration = registration; - Login = login; - Validation = validation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Google provider should not be enabled despite the set registration; - /// otherwise, &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the Google provider. - /// - [JsonProperty(PropertyName = "registration")] - public ClientRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow. - /// - [JsonProperty(PropertyName = "login")] - public LoginScopes Login { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Active - /// Directory token validation flow. - /// - [JsonProperty(PropertyName = "validation")] - public AllowedAudiencesValidation Validation { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HandlerMapping.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HandlerMapping.cs deleted file mode 100644 index 42a290c89308..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HandlerMapping.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The IIS handler mappings used to define which handler processes HTTP - /// requests with certain extension. - /// For example, it is used to configure php-cgi.exe process to handle all - /// HTTP requests with *.php extension. - /// - public partial class HandlerMapping - { - /// - /// Initializes a new instance of the HandlerMapping class. - /// - public HandlerMapping() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HandlerMapping class. - /// - /// Requests with this extension will be - /// handled using the specified FastCGI application. - /// The absolute path to the FastCGI - /// application. - /// Command-line arguments to be passed to the - /// script processor. - public HandlerMapping(string extension = default(string), string scriptProcessor = default(string), string arguments = default(string)) - { - Extension = extension; - ScriptProcessor = scriptProcessor; - Arguments = arguments; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets requests with this extension will be handled using the - /// specified FastCGI application. - /// - [JsonProperty(PropertyName = "extension")] - public string Extension { get; set; } - - /// - /// Gets or sets the absolute path to the FastCGI application. - /// - [JsonProperty(PropertyName = "scriptProcessor")] - public string ScriptProcessor { get; set; } - - /// - /// Gets or sets command-line arguments to be passed to the script - /// processor. - /// - [JsonProperty(PropertyName = "arguments")] - public string Arguments { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostKeys.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostKeys.cs deleted file mode 100644 index f418e7a6f4b2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostKeys.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Functions host level keys. - /// - public partial class HostKeys - { - /// - /// Initializes a new instance of the HostKeys class. - /// - public HostKeys() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostKeys class. - /// - /// Secret key. - /// Host level function keys. - /// System keys. - public HostKeys(string masterKey = default(string), IDictionary functionKeys = default(IDictionary), IDictionary systemKeys = default(IDictionary)) - { - MasterKey = masterKey; - FunctionKeys = functionKeys; - SystemKeys = systemKeys; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets secret key. - /// - [JsonProperty(PropertyName = "masterKey")] - public string MasterKey { get; set; } - - /// - /// Gets or sets host level function keys. - /// - [JsonProperty(PropertyName = "functionKeys")] - public IDictionary FunctionKeys { get; set; } - - /// - /// Gets or sets system keys. - /// - [JsonProperty(PropertyName = "systemKeys")] - public IDictionary SystemKeys { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostName.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostName.cs deleted file mode 100644 index 4b90a7163427..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostName.cs +++ /dev/null @@ -1,109 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Details of a hostname derived from a domain. - /// - public partial class HostName - { - /// - /// Initializes a new instance of the HostName class. - /// - public HostName() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostName class. - /// - /// Name of the hostname. - /// List of apps the hostname is assigned to. - /// This list will have more than one app only if the hostname is - /// pointing to a Traffic Manager. - /// Name of the Azure resource the - /// hostname is assigned to. If it is assigned to a Traffic Manager - /// then it will be the Traffic Manager name otherwise it will be the - /// app name. - /// Type of the Azure resource the - /// hostname is assigned to. Possible values include: 'Website', - /// 'TrafficManager' - /// Type of the DNS record. - /// Possible values include: 'CName', 'A' - /// Type of the hostname. Possible values - /// include: 'Verified', 'Managed' - public HostName(string name = default(string), IList siteNames = default(IList), string azureResourceName = default(string), AzureResourceType? azureResourceType = default(AzureResourceType?), CustomHostNameDnsRecordType? customHostNameDnsRecordType = default(CustomHostNameDnsRecordType?), HostNameType? hostNameType = default(HostNameType?)) - { - Name = name; - SiteNames = siteNames; - AzureResourceName = azureResourceName; - AzureResourceType = azureResourceType; - CustomHostNameDnsRecordType = customHostNameDnsRecordType; - HostNameType = hostNameType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the hostname. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets list of apps the hostname is assigned to. This list - /// will have more than one app only if the hostname is pointing to a - /// Traffic Manager. - /// - [JsonProperty(PropertyName = "siteNames")] - public IList SiteNames { get; set; } - - /// - /// Gets or sets name of the Azure resource the hostname is assigned - /// to. If it is assigned to a Traffic Manager then it will be the - /// Traffic Manager name otherwise it will be the app name. - /// - [JsonProperty(PropertyName = "azureResourceName")] - public string AzureResourceName { get; set; } - - /// - /// Gets or sets type of the Azure resource the hostname is assigned - /// to. Possible values include: 'Website', 'TrafficManager' - /// - [JsonProperty(PropertyName = "azureResourceType")] - public AzureResourceType? AzureResourceType { get; set; } - - /// - /// Gets or sets type of the DNS record. Possible values include: - /// 'CName', 'A' - /// - [JsonProperty(PropertyName = "customHostNameDnsRecordType")] - public CustomHostNameDnsRecordType? CustomHostNameDnsRecordType { get; set; } - - /// - /// Gets or sets type of the hostname. Possible values include: - /// 'Verified', 'Managed' - /// - [JsonProperty(PropertyName = "hostNameType")] - public HostNameType? HostNameType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameBinding.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameBinding.cs deleted file mode 100644 index fd1f70bf2206..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameBinding.cs +++ /dev/null @@ -1,134 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A hostname binding object. - /// - [Rest.Serialization.JsonTransformation] - public partial class HostNameBinding : ProxyOnlyResource - { - /// - /// Initializes a new instance of the HostNameBinding class. - /// - public HostNameBinding() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostNameBinding class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// App Service app name. - /// Fully qualified ARM domain resource - /// URI. - /// Azure resource name. - /// Azure resource type. Possible - /// values include: 'Website', 'TrafficManager' - /// Custom DNS record type. - /// Possible values include: 'CName', 'A' - /// Hostname type. Possible values include: - /// 'Verified', 'Managed' - /// SSL type. Possible values include: - /// 'Disabled', 'SniEnabled', 'IpBasedEnabled' - /// SSL certificate thumbprint - /// Virtual IP address assigned to the hostname - /// if IP based SSL is enabled. - public HostNameBinding(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string siteName = default(string), string domainId = default(string), string azureResourceName = default(string), AzureResourceType? azureResourceType = default(AzureResourceType?), CustomHostNameDnsRecordType? customHostNameDnsRecordType = default(CustomHostNameDnsRecordType?), HostNameType? hostNameType = default(HostNameType?), SslState? sslState = default(SslState?), string thumbprint = default(string), string virtualIP = default(string)) - : base(id, name, kind, type) - { - SiteName = siteName; - DomainId = domainId; - AzureResourceName = azureResourceName; - AzureResourceType = azureResourceType; - CustomHostNameDnsRecordType = customHostNameDnsRecordType; - HostNameType = hostNameType; - SslState = sslState; - Thumbprint = thumbprint; - VirtualIP = virtualIP; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets app Service app name. - /// - [JsonProperty(PropertyName = "properties.siteName")] - public string SiteName { get; set; } - - /// - /// Gets or sets fully qualified ARM domain resource URI. - /// - [JsonProperty(PropertyName = "properties.domainId")] - public string DomainId { get; set; } - - /// - /// Gets or sets azure resource name. - /// - [JsonProperty(PropertyName = "properties.azureResourceName")] - public string AzureResourceName { get; set; } - - /// - /// Gets or sets azure resource type. Possible values include: - /// 'Website', 'TrafficManager' - /// - [JsonProperty(PropertyName = "properties.azureResourceType")] - public AzureResourceType? AzureResourceType { get; set; } - - /// - /// Gets or sets custom DNS record type. Possible values include: - /// 'CName', 'A' - /// - [JsonProperty(PropertyName = "properties.customHostNameDnsRecordType")] - public CustomHostNameDnsRecordType? CustomHostNameDnsRecordType { get; set; } - - /// - /// Gets or sets hostname type. Possible values include: 'Verified', - /// 'Managed' - /// - [JsonProperty(PropertyName = "properties.hostNameType")] - public HostNameType? HostNameType { get; set; } - - /// - /// Gets or sets SSL type. Possible values include: 'Disabled', - /// 'SniEnabled', 'IpBasedEnabled' - /// - [JsonProperty(PropertyName = "properties.sslState")] - public SslState? SslState { get; set; } - - /// - /// Gets or sets SSL certificate thumbprint - /// - [JsonProperty(PropertyName = "properties.thumbprint")] - public string Thumbprint { get; set; } - - /// - /// Gets virtual IP address assigned to the hostname if IP based SSL is - /// enabled. - /// - [JsonProperty(PropertyName = "properties.virtualIP")] - public string VirtualIP { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameSslState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameSslState.cs deleted file mode 100644 index de29e1c19fa8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameSslState.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// SSL-enabled hostname. - /// - public partial class HostNameSslState - { - /// - /// Initializes a new instance of the HostNameSslState class. - /// - public HostNameSslState() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostNameSslState class. - /// - /// Hostname. - /// SSL type. Possible values include: - /// 'Disabled', 'SniEnabled', 'IpBasedEnabled' - /// Virtual IP address assigned to the hostname - /// if IP based SSL is enabled. - /// SSL certificate thumbprint. - /// Set to <code>true</code> to - /// update existing hostname. - /// Indicates whether the hostname is a standard - /// or repository hostname. Possible values include: 'Standard', - /// 'Repository' - public HostNameSslState(string name = default(string), SslState? sslState = default(SslState?), string virtualIP = default(string), string thumbprint = default(string), bool? toUpdate = default(bool?), HostType? hostType = default(HostType?)) - { - Name = name; - SslState = sslState; - VirtualIP = virtualIP; - Thumbprint = thumbprint; - ToUpdate = toUpdate; - HostType = hostType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets hostname. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets SSL type. Possible values include: 'Disabled', - /// 'SniEnabled', 'IpBasedEnabled' - /// - [JsonProperty(PropertyName = "sslState")] - public SslState? SslState { get; set; } - - /// - /// Gets or sets virtual IP address assigned to the hostname if IP - /// based SSL is enabled. - /// - [JsonProperty(PropertyName = "virtualIP")] - public string VirtualIP { get; set; } - - /// - /// Gets or sets SSL certificate thumbprint. - /// - [JsonProperty(PropertyName = "thumbprint")] - public string Thumbprint { get; set; } - - /// - /// Gets or sets set to &lt;code&gt;true&lt;/code&gt; - /// to update existing hostname. - /// - [JsonProperty(PropertyName = "toUpdate")] - public bool? ToUpdate { get; set; } - - /// - /// Gets or sets indicates whether the hostname is a standard or - /// repository hostname. Possible values include: 'Standard', - /// 'Repository' - /// - [JsonProperty(PropertyName = "hostType")] - public HostType? HostType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameType.cs deleted file mode 100644 index 2aa52b79a3e5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostNameType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - 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 = "Verified")] - Verified, - [EnumMember(Value = "Managed")] - Managed - } - internal static class HostNameTypeEnumExtension - { - internal static string ToSerializedValue(this HostNameType? value) - { - return value == null ? null : ((HostNameType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this HostNameType value) - { - switch( value ) - { - case HostNameType.Verified: - return "Verified"; - case HostNameType.Managed: - return "Managed"; - } - return null; - } - - internal static HostNameType? ParseHostNameType(this string value) - { - switch( value ) - { - case "Verified": - return HostNameType.Verified; - case "Managed": - return HostNameType.Managed; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostType.cs deleted file mode 100644 index 01df354dfa0e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for HostType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum HostType - { - [EnumMember(Value = "Standard")] - Standard, - [EnumMember(Value = "Repository")] - Repository - } - internal static class HostTypeEnumExtension - { - internal static string ToSerializedValue(this HostType? value) - { - return value == null ? null : ((HostType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this HostType value) - { - switch( value ) - { - case HostType.Standard: - return "Standard"; - case HostType.Repository: - return "Repository"; - } - return null; - } - - internal static HostType? ParseHostType(this string value) - { - switch( value ) - { - case "Standard": - return HostType.Standard; - case "Repository": - return HostType.Repository; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDeploymentInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDeploymentInfo.cs deleted file mode 100644 index 277d773c6ce7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDeploymentInfo.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information needed to create resources on an App Service Environment. - /// - public partial class HostingEnvironmentDeploymentInfo - { - /// - /// Initializes a new instance of the HostingEnvironmentDeploymentInfo - /// class. - /// - public HostingEnvironmentDeploymentInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostingEnvironmentDeploymentInfo - /// class. - /// - /// Name of the App Service Environment. - /// Location of the App Service - /// Environment. - public HostingEnvironmentDeploymentInfo(string name = default(string), string location = default(string)) - { - Name = name; - Location = location; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the App Service Environment. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets location of the App Service Environment. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDiagnostics.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDiagnostics.cs deleted file mode 100644 index bf1546b5752d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentDiagnostics.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Diagnostics for an App Service Environment. - /// - public partial class HostingEnvironmentDiagnostics - { - /// - /// Initializes a new instance of the HostingEnvironmentDiagnostics - /// class. - /// - public HostingEnvironmentDiagnostics() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostingEnvironmentDiagnostics - /// class. - /// - /// Name/identifier of the diagnostics. - /// Diagnostics output. - public HostingEnvironmentDiagnostics(string name = default(string), string diagnosticsOutput = default(string)) - { - Name = name; - DiagnosticsOutput = diagnosticsOutput; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name/identifier of the diagnostics. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets diagnostics output. - /// - [JsonProperty(PropertyName = "diagnosticsOutput")] - public string DiagnosticsOutput { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentProfile.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentProfile.cs deleted file mode 100644 index 735924754efa..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentProfile.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specification for an App Service Environment to use for this resource. - /// - public partial class HostingEnvironmentProfile - { - /// - /// Initializes a new instance of the HostingEnvironmentProfile class. - /// - public HostingEnvironmentProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HostingEnvironmentProfile class. - /// - /// Resource ID of the App Service - /// Environment. - /// Name of the App Service Environment. - /// Resource type of the App Service - /// Environment. - public HostingEnvironmentProfile(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 or sets resource ID of the App Service Environment. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets name of the App Service Environment. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets resource type of the App Service Environment. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentStatus.cs deleted file mode 100644 index 67db91b82f23..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HostingEnvironmentStatus.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for HostingEnvironmentStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum HostingEnvironmentStatus - { - [EnumMember(Value = "Preparing")] - Preparing, - [EnumMember(Value = "Ready")] - Ready, - [EnumMember(Value = "Scaling")] - Scaling, - [EnumMember(Value = "Deleting")] - Deleting - } - internal static class HostingEnvironmentStatusEnumExtension - { - internal static string ToSerializedValue(this HostingEnvironmentStatus? value) - { - return value == null ? null : ((HostingEnvironmentStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this HostingEnvironmentStatus value) - { - switch( value ) - { - case HostingEnvironmentStatus.Preparing: - return "Preparing"; - case HostingEnvironmentStatus.Ready: - return "Ready"; - case HostingEnvironmentStatus.Scaling: - return "Scaling"; - case HostingEnvironmentStatus.Deleting: - return "Deleting"; - } - return null; - } - - internal static HostingEnvironmentStatus? ParseHostingEnvironmentStatus(this string value) - { - switch( value ) - { - case "Preparing": - return HostingEnvironmentStatus.Preparing; - case "Ready": - return HostingEnvironmentStatus.Ready; - case "Scaling": - return HostingEnvironmentStatus.Scaling; - case "Deleting": - return HostingEnvironmentStatus.Deleting; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpLogsConfig.cs deleted file mode 100644 index 32628ade3880..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpLogsConfig.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Http logs configuration. - /// - public partial class HttpLogsConfig - { - /// - /// Initializes a new instance of the HttpLogsConfig class. - /// - public HttpLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HttpLogsConfig class. - /// - /// Http logs to file system - /// configuration. - /// Http logs to azure blob storage - /// configuration. - public HttpLogsConfig(FileSystemHttpLogsConfig fileSystem = default(FileSystemHttpLogsConfig), AzureBlobStorageHttpLogsConfig azureBlobStorage = default(AzureBlobStorageHttpLogsConfig)) - { - FileSystem = fileSystem; - AzureBlobStorage = azureBlobStorage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets http logs to file system configuration. - /// - [JsonProperty(PropertyName = "fileSystem")] - public FileSystemHttpLogsConfig FileSystem { get; set; } - - /// - /// Gets or sets http logs to azure blob storage configuration. - /// - [JsonProperty(PropertyName = "azureBlobStorage")] - public AzureBlobStorageHttpLogsConfig AzureBlobStorage { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (FileSystem != null) - { - FileSystem.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs deleted file mode 100644 index 49284b8b0305..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpScaleRule.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App container Custom scaling rule. - /// - public partial class HttpScaleRule - { - /// - /// Initializes a new instance of the HttpScaleRule class. - /// - public HttpScaleRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HttpScaleRule class. - /// - /// Metadata properties to describe http scale - /// rule. - /// Authentication secrets for the custom scale - /// rule. - public HttpScaleRule(IDictionary metadata = default(IDictionary), IList auth = default(IList)) - { - Metadata = metadata; - Auth = auth; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets metadata properties to describe http scale rule. - /// - [JsonProperty(PropertyName = "metadata")] - public IDictionary Metadata { get; set; } - - /// - /// Gets or sets authentication secrets for the custom scale rule. - /// - [JsonProperty(PropertyName = "auth")] - public IList Auth { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs deleted file mode 100644 index 1f52e35038f3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettings.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the HTTP requests for authentication and - /// authorization requests made against App Service - /// Authentication/Authorization. - /// - public partial class HttpSettings - { - /// - /// Initializes a new instance of the HttpSettings class. - /// - public HttpSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HttpSettings class. - /// - /// <code>false</code> if the - /// authentication/authorization responses not having the HTTPS scheme - /// are permissible; otherwise, <code>true</code>. - /// The configuration settings of the paths HTTP - /// requests. - /// The configuration settings of a forward - /// proxy used to make the requests. - public HttpSettings(bool? requireHttps = default(bool?), HttpSettingsRoutes routes = default(HttpSettingsRoutes), ForwardProxy forwardProxy = default(ForwardProxy)) - { - RequireHttps = requireHttps; - Routes = routes; - ForwardProxy = forwardProxy; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// authentication/authorization responses not having the HTTPS scheme - /// are permissible; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "requireHttps")] - public bool? RequireHttps { get; set; } - - /// - /// Gets or sets the configuration settings of the paths HTTP requests. - /// - [JsonProperty(PropertyName = "routes")] - public HttpSettingsRoutes Routes { get; set; } - - /// - /// Gets or sets the configuration settings of a forward proxy used to - /// make the requests. - /// - [JsonProperty(PropertyName = "forwardProxy")] - public ForwardProxy ForwardProxy { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs deleted file mode 100644 index 93693d8f9f03..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HttpSettingsRoutes.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the paths HTTP requests. - /// - public partial class HttpSettingsRoutes - { - /// - /// Initializes a new instance of the HttpSettingsRoutes class. - /// - public HttpSettingsRoutes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HttpSettingsRoutes class. - /// - /// The prefix that should precede all the - /// authentication/authorization paths. - public HttpSettingsRoutes(string apiPrefix = default(string)) - { - ApiPrefix = apiPrefix; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the prefix that should precede all the - /// authentication/authorization paths. - /// - [JsonProperty(PropertyName = "apiPrefix")] - public string ApiPrefix { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnection.cs deleted file mode 100644 index e98573aa1d10..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnection.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Hybrid Connection contract. This is used to configure a Hybrid - /// Connection. - /// - [Rest.Serialization.JsonTransformation] - public partial class HybridConnection : ProxyOnlyResource - { - /// - /// Initializes a new instance of the HybridConnection class. - /// - public HybridConnection() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HybridConnection class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The name of the Service Bus - /// namespace. - /// The name of the Service Bus relay. - /// The ARM URI to the Service Bus - /// relay. - /// The hostname of the endpoint. - /// The port of the endpoint. - /// The name of the Service Bus key which has - /// Send permissions. This is used to authenticate to Service - /// Bus. - /// The value of the Service Bus key. This - /// is used to authenticate to Service Bus. In ARM this key will not be - /// returned - /// normally, use the POST /listKeys API instead. - /// The suffix for the service bus - /// endpoint. By default this is .servicebus.windows.net - public HybridConnection(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string serviceBusNamespace = default(string), string relayName = default(string), string relayArmUri = default(string), string hostname = default(string), int? port = default(int?), string sendKeyName = default(string), string sendKeyValue = default(string), string serviceBusSuffix = default(string)) - : base(id, name, kind, type) - { - ServiceBusNamespace = serviceBusNamespace; - RelayName = relayName; - RelayArmUri = relayArmUri; - Hostname = hostname; - Port = port; - SendKeyName = sendKeyName; - SendKeyValue = sendKeyValue; - ServiceBusSuffix = serviceBusSuffix; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the Service Bus namespace. - /// - [JsonProperty(PropertyName = "properties.serviceBusNamespace")] - public string ServiceBusNamespace { get; set; } - - /// - /// Gets or sets the name of the Service Bus relay. - /// - [JsonProperty(PropertyName = "properties.relayName")] - public string RelayName { get; set; } - - /// - /// Gets or sets the ARM URI to the Service Bus relay. - /// - [JsonProperty(PropertyName = "properties.relayArmUri")] - public string RelayArmUri { get; set; } - - /// - /// Gets or sets the hostname of the endpoint. - /// - [JsonProperty(PropertyName = "properties.hostname")] - public string Hostname { get; set; } - - /// - /// Gets or sets the port of the endpoint. - /// - [JsonProperty(PropertyName = "properties.port")] - public int? Port { get; set; } - - /// - /// Gets or sets the name of the Service Bus key which has Send - /// permissions. This is used to authenticate to Service Bus. - /// - [JsonProperty(PropertyName = "properties.sendKeyName")] - public string SendKeyName { get; set; } - - /// - /// Gets or sets the value of the Service Bus key. This is used to - /// authenticate to Service Bus. In ARM this key will not be returned - /// normally, use the POST /listKeys API instead. - /// - [JsonProperty(PropertyName = "properties.sendKeyValue")] - public string SendKeyValue { get; set; } - - /// - /// Gets or sets the suffix for the service bus endpoint. By default - /// this is .servicebus.windows.net - /// - [JsonProperty(PropertyName = "properties.serviceBusSuffix")] - public string ServiceBusSuffix { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionKey.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionKey.cs deleted file mode 100644 index c2e79154a648..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionKey.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Hybrid Connection key contract. This has the send key name and value - /// for a Hybrid Connection. - /// - [Rest.Serialization.JsonTransformation] - public partial class HybridConnectionKey : ProxyOnlyResource - { - /// - /// Initializes a new instance of the HybridConnectionKey class. - /// - public HybridConnectionKey() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HybridConnectionKey class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The name of the send key. - /// The value of the send key. - public HybridConnectionKey(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string sendKeyName = default(string), string sendKeyValue = default(string)) - : base(id, name, kind, type) - { - SendKeyName = sendKeyName; - SendKeyValue = sendKeyValue; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the name of the send key. - /// - [JsonProperty(PropertyName = "properties.sendKeyName")] - public string SendKeyName { get; private set; } - - /// - /// Gets the value of the send key. - /// - [JsonProperty(PropertyName = "properties.sendKeyValue")] - public string SendKeyValue { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionLimits.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionLimits.cs deleted file mode 100644 index 9ada5c91749b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/HybridConnectionLimits.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Hybrid Connection limits contract. This is used to return the plan - /// limits of Hybrid Connections. - /// - [Rest.Serialization.JsonTransformation] - public partial class HybridConnectionLimits : ProxyOnlyResource - { - /// - /// Initializes a new instance of the HybridConnectionLimits class. - /// - public HybridConnectionLimits() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the HybridConnectionLimits class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The current number of Hybrid - /// Connections. - /// The maximum number of Hybrid Connections - /// allowed. - public HybridConnectionLimits(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? current = default(int?), int? maximum = default(int?)) - : base(id, name, kind, type) - { - Current = current; - Maximum = maximum; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the current number of Hybrid Connections. - /// - [JsonProperty(PropertyName = "properties.current")] - public int? Current { get; private set; } - - /// - /// Gets the maximum number of Hybrid Connections allowed. - /// - [JsonProperty(PropertyName = "properties.maximum")] - public int? Maximum { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Identifier.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Identifier.cs deleted file mode 100644 index 7571f8806156..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Identifier.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A domain specific resource identifier. - /// - [Rest.Serialization.JsonTransformation] - public partial class Identifier : ProxyOnlyResource - { - /// - /// Initializes a new instance of the Identifier class. - /// - public Identifier() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Identifier class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// String representation of the identity. - public Identifier(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string value = default(string)) - : base(id, name, kind, type) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets string representation of the identity. - /// - [JsonProperty(PropertyName = "properties.id")] - public string Value { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs deleted file mode 100644 index ec87d3a0f13b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IdentityProviders.cs +++ /dev/null @@ -1,134 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of each of the identity providers used to - /// configure App Service Authentication/Authorization. - /// - public partial class IdentityProviders - { - /// - /// Initializes a new instance of the IdentityProviders class. - /// - public IdentityProviders() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the IdentityProviders class. - /// - /// The configuration settings of - /// the Azure Active directory provider. - /// The configuration settings of the Facebook - /// provider. - /// The configuration settings of the GitHub - /// provider. - /// The configuration settings of the Google - /// provider. - /// The configuration settings of - /// the legacy Microsoft Account provider. - /// The configuration settings of the Twitter - /// provider. - /// The configuration settings of the Apple - /// provider. - /// The configuration settings of the - /// Azure Static Web Apps provider. - /// The map of the name of - /// the alias of each custom Open ID Connect provider to the - /// configuration settings of the custom Open ID Connect - /// provider. - public IdentityProviders(AzureActiveDirectory azureActiveDirectory = default(AzureActiveDirectory), Facebook facebook = default(Facebook), GitHub gitHub = default(GitHub), Google google = default(Google), LegacyMicrosoftAccount legacyMicrosoftAccount = default(LegacyMicrosoftAccount), Twitter twitter = default(Twitter), Apple apple = default(Apple), AzureStaticWebApps azureStaticWebApps = default(AzureStaticWebApps), IDictionary customOpenIdConnectProviders = default(IDictionary)) - { - AzureActiveDirectory = azureActiveDirectory; - Facebook = facebook; - GitHub = gitHub; - Google = google; - LegacyMicrosoftAccount = legacyMicrosoftAccount; - Twitter = twitter; - Apple = apple; - AzureStaticWebApps = azureStaticWebApps; - CustomOpenIdConnectProviders = customOpenIdConnectProviders; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the configuration settings of the Azure Active - /// directory provider. - /// - [JsonProperty(PropertyName = "azureActiveDirectory")] - public AzureActiveDirectory AzureActiveDirectory { get; set; } - - /// - /// Gets or sets the configuration settings of the Facebook provider. - /// - [JsonProperty(PropertyName = "facebook")] - public Facebook Facebook { get; set; } - - /// - /// Gets or sets the configuration settings of the GitHub provider. - /// - [JsonProperty(PropertyName = "gitHub")] - public GitHub GitHub { get; set; } - - /// - /// Gets or sets the configuration settings of the Google provider. - /// - [JsonProperty(PropertyName = "google")] - public Google Google { get; set; } - - /// - /// Gets or sets the configuration settings of the legacy Microsoft - /// Account provider. - /// - [JsonProperty(PropertyName = "legacyMicrosoftAccount")] - public LegacyMicrosoftAccount LegacyMicrosoftAccount { get; set; } - - /// - /// Gets or sets the configuration settings of the Twitter provider. - /// - [JsonProperty(PropertyName = "twitter")] - public Twitter Twitter { get; set; } - - /// - /// Gets or sets the configuration settings of the Apple provider. - /// - [JsonProperty(PropertyName = "apple")] - public Apple Apple { get; set; } - - /// - /// Gets or sets the configuration settings of the Azure Static Web - /// Apps provider. - /// - [JsonProperty(PropertyName = "azureStaticWebApps")] - public AzureStaticWebApps AzureStaticWebApps { get; set; } - - /// - /// Gets or sets the map of the name of the alias of each custom Open - /// ID Connect provider to the - /// configuration settings of the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "customOpenIdConnectProviders")] - public IDictionary CustomOpenIdConnectProviders { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InAvailabilityReasonType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InAvailabilityReasonType.cs deleted file mode 100644 index 49dc1f04dac2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InAvailabilityReasonType.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for InAvailabilityReasonType. - /// - public static class InAvailabilityReasonType - { - public const string Invalid = "Invalid"; - public const string AlreadyExists = "AlreadyExists"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InboundEnvironmentEndpoint.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InboundEnvironmentEndpoint.cs deleted file mode 100644 index ca1a6a2421a7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InboundEnvironmentEndpoint.cs +++ /dev/null @@ -1,76 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The IP Addresses and Ports that require inbound network access to and - /// within the subnet of the App Service Environment. - /// - public partial class InboundEnvironmentEndpoint - { - /// - /// Initializes a new instance of the InboundEnvironmentEndpoint class. - /// - public InboundEnvironmentEndpoint() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the InboundEnvironmentEndpoint class. - /// - /// Short text describing the purpose of the - /// network traffic. - /// The IP addresses that network traffic will - /// originate from in cidr notation. - /// The ports that network traffic will arrive to - /// the App Service Environment at. - public InboundEnvironmentEndpoint(string description = default(string), IList endpoints = default(IList), IList ports = default(IList)) - { - Description = description; - Endpoints = endpoints; - Ports = ports; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets short text describing the purpose of the network - /// traffic. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets the IP addresses that network traffic will originate - /// from in cidr notation. - /// - [JsonProperty(PropertyName = "endpoints")] - public IList Endpoints { get; set; } - - /// - /// Gets or sets the ports that network traffic will arrive to the App - /// Service Environment at. - /// - [JsonProperty(PropertyName = "ports")] - public IList Ports { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs deleted file mode 100644 index bf7e851b957d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Ingress.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App Ingress configuration. - /// - public partial class Ingress - { - /// - /// Initializes a new instance of the Ingress class. - /// - public Ingress() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Ingress class. - /// - /// Hostname. - /// Bool indicating if app exposes an external - /// http endpoint - /// Target Port in containers for traffic from - /// ingress - /// Ingress transport protocol. Possible values - /// include: 'auto', 'http', 'http2' - /// Bool indicating if HTTP connections to - /// is allowed. If set to false HTTP connections are automatically - /// redirected to HTTPS connections - public Ingress(string fqdn = default(string), bool? external = default(bool?), int? targetPort = default(int?), string transport = default(string), IList traffic = default(IList), bool? allowInsecure = default(bool?)) - { - Fqdn = fqdn; - External = external; - TargetPort = targetPort; - Transport = transport; - Traffic = traffic; - AllowInsecure = allowInsecure; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets hostname. - /// - [JsonProperty(PropertyName = "fqdn")] - public string Fqdn { get; private set; } - - /// - /// Gets or sets bool indicating if app exposes an external http - /// endpoint - /// - [JsonProperty(PropertyName = "external")] - public bool? External { get; set; } - - /// - /// Gets or sets target Port in containers for traffic from ingress - /// - [JsonProperty(PropertyName = "targetPort")] - public int? TargetPort { get; set; } - - /// - /// Gets or sets ingress transport protocol. Possible values include: - /// 'auto', 'http', 'http2' - /// - [JsonProperty(PropertyName = "transport")] - public string Transport { get; set; } - - /// - /// - [JsonProperty(PropertyName = "traffic")] - public IList Traffic { get; set; } - - /// - /// Gets or sets bool indicating if HTTP connections to is allowed. If - /// set to false HTTP connections are automatically redirected to HTTPS - /// connections - /// - [JsonProperty(PropertyName = "allowInsecure")] - public bool? AllowInsecure { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs deleted file mode 100644 index 045099b2a92f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IngressTransportMethod.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for IngressTransportMethod. - /// - public static class IngressTransportMethod - { - public const string Auto = "auto"; - public const string Http = "http"; - public const string Http2 = "http2"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs deleted file mode 100644 index e625bc5841cd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/InsightStatus.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for InsightStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InsightStatus - { - [EnumMember(Value = "Critical")] - Critical, - [EnumMember(Value = "Warning")] - Warning, - [EnumMember(Value = "Info")] - Info, - [EnumMember(Value = "Success")] - Success, - [EnumMember(Value = "None")] - None - } - internal static class InsightStatusEnumExtension - { - internal static string ToSerializedValue(this InsightStatus? value) - { - return value == null ? null : ((InsightStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this InsightStatus value) - { - switch( value ) - { - case InsightStatus.Critical: - return "Critical"; - case InsightStatus.Warning: - return "Warning"; - case InsightStatus.Info: - return "Info"; - case InsightStatus.Success: - return "Success"; - case InsightStatus.None: - return "None"; - } - return null; - } - - internal static InsightStatus? ParseInsightStatus(this string value) - { - switch( value ) - { - case "Critical": - return InsightStatus.Critical; - case "Warning": - return InsightStatus.Warning; - case "Info": - return InsightStatus.Info; - case "Success": - return InsightStatus.Success; - case "None": - return InsightStatus.None; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpFilterTag.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpFilterTag.cs deleted file mode 100644 index 3b5a6fdf588c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpFilterTag.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for IpFilterTag. - /// - public static class IpFilterTag - { - public const string Default = "Default"; - public const string XffProxy = "XffProxy"; - public const string ServiceTag = "ServiceTag"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpSecurityRestriction.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpSecurityRestriction.cs deleted file mode 100644 index 7dee1a54d39a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IpSecurityRestriction.cs +++ /dev/null @@ -1,201 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// IP security restriction on an app. - /// - public partial class IpSecurityRestriction - { - /// - /// Initializes a new instance of the IpSecurityRestriction class. - /// - public IpSecurityRestriction() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the IpSecurityRestriction class. - /// - /// IP address the security restriction is - /// valid for. - /// It can be in form of pure ipv4 address (required SubnetMask - /// property) or - /// CIDR notation such as ipv4/mask (leading bit match). For CIDR, - /// SubnetMask property must not be specified. - /// Subnet mask for the range of IP addresses - /// the restriction is valid for. - /// Virtual network resource - /// id - /// (internal) Vnet traffic tag - /// (internal) Subnet traffic - /// tag - /// Allow or Deny access for this IP - /// range. - /// Defines what this IP filter will be used for. - /// This is to support IP filtering on proxies. Possible values - /// include: 'Default', 'XffProxy', 'ServiceTag' - /// Priority of IP restriction rule. - /// IP restriction rule name. - /// IP restriction rule description. - /// IP restriction rule headers. - /// X-Forwarded-Host - /// (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). - /// The matching logic is .. - /// - If the property is null or empty (default), all hosts(or lack of) - /// are allowed. - /// - A value is compared using ordinal-ignore-case (excluding port - /// number). - /// - Subdomain wildcards are permitted but don't match the root - /// domain. For example, *.contoso.com matches the subdomain - /// foo.contoso.com - /// but not the root domain contoso.com or multi-level - /// foo.bar.contoso.com - /// - Unicode host names are allowed but are converted to Punycode for - /// matching. - /// - /// X-Forwarded-For - /// (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). - /// The matching logic is .. - /// - If the property is null or empty (default), any forwarded-for - /// chains (or lack of) are allowed. - /// - If any address (excluding port number) in the chain (comma - /// separated) matches the CIDR defined by the property. - /// - /// X-Azure-FDID and X-FD-HealthProbe. - /// The matching logic is exact match. - public IpSecurityRestriction(string ipAddress = default(string), string subnetMask = default(string), string vnetSubnetResourceId = default(string), int? vnetTrafficTag = default(int?), int? subnetTrafficTag = default(int?), string action = default(string), string tag = default(string), int? priority = default(int?), string name = default(string), string description = default(string), IDictionary> headers = default(IDictionary>)) - { - IpAddress = ipAddress; - SubnetMask = subnetMask; - VnetSubnetResourceId = vnetSubnetResourceId; - VnetTrafficTag = vnetTrafficTag; - SubnetTrafficTag = subnetTrafficTag; - Action = action; - Tag = tag; - Priority = priority; - Name = name; - Description = description; - Headers = headers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets IP address the security restriction is valid for. - /// It can be in form of pure ipv4 address (required SubnetMask - /// property) or - /// CIDR notation such as ipv4/mask (leading bit match). For CIDR, - /// SubnetMask property must not be specified. - /// - [JsonProperty(PropertyName = "ipAddress")] - public string IpAddress { get; set; } - - /// - /// Gets or sets subnet mask for the range of IP addresses the - /// restriction is valid for. - /// - [JsonProperty(PropertyName = "subnetMask")] - public string SubnetMask { get; set; } - - /// - /// Gets or sets virtual network resource id - /// - [JsonProperty(PropertyName = "vnetSubnetResourceId")] - public string VnetSubnetResourceId { get; set; } - - /// - /// Gets or sets (internal) Vnet traffic tag - /// - [JsonProperty(PropertyName = "vnetTrafficTag")] - public int? VnetTrafficTag { get; set; } - - /// - /// Gets or sets (internal) Subnet traffic tag - /// - [JsonProperty(PropertyName = "subnetTrafficTag")] - public int? SubnetTrafficTag { get; set; } - - /// - /// Gets or sets allow or Deny access for this IP range. - /// - [JsonProperty(PropertyName = "action")] - public string Action { get; set; } - - /// - /// Gets or sets defines what this IP filter will be used for. This is - /// to support IP filtering on proxies. Possible values include: - /// 'Default', 'XffProxy', 'ServiceTag' - /// - [JsonProperty(PropertyName = "tag")] - public string Tag { get; set; } - - /// - /// Gets or sets priority of IP restriction rule. - /// - [JsonProperty(PropertyName = "priority")] - public int? Priority { get; set; } - - /// - /// Gets or sets IP restriction rule name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets IP restriction rule description. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets IP restriction rule headers. - /// X-Forwarded-Host - /// (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). - /// The matching logic is .. - /// - If the property is null or empty (default), all hosts(or lack of) - /// are allowed. - /// - A value is compared using ordinal-ignore-case (excluding port - /// number). - /// - Subdomain wildcards are permitted but don't match the root - /// domain. For example, *.contoso.com matches the subdomain - /// foo.contoso.com - /// but not the root domain contoso.com or multi-level - /// foo.bar.contoso.com - /// - Unicode host names are allowed but are converted to Punycode for - /// matching. - /// - /// X-Forwarded-For - /// (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples). - /// The matching logic is .. - /// - If the property is null or empty (default), any forwarded-for - /// chains (or lack of) are allowed. - /// - If any address (excluding port number) in the chain (comma - /// separated) matches the CIDR defined by the property. - /// - /// X-Azure-FDID and X-FD-HealthProbe. - /// The matching logic is exact match. - /// - [JsonProperty(PropertyName = "headers")] - public IDictionary> Headers { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IssueType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IssueType.cs deleted file mode 100644 index 0d9046f443e5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/IssueType.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for IssueType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum IssueType - { - [EnumMember(Value = "ServiceIncident")] - ServiceIncident, - [EnumMember(Value = "AppDeployment")] - AppDeployment, - [EnumMember(Value = "AppCrash")] - AppCrash, - [EnumMember(Value = "RuntimeIssueDetected")] - RuntimeIssueDetected, - [EnumMember(Value = "AseDeployment")] - AseDeployment, - [EnumMember(Value = "UserIssue")] - UserIssue, - [EnumMember(Value = "PlatformIssue")] - PlatformIssue, - [EnumMember(Value = "Other")] - Other - } - internal static class IssueTypeEnumExtension - { - internal static string ToSerializedValue(this IssueType? value) - { - return value == null ? null : ((IssueType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this IssueType value) - { - switch( value ) - { - case IssueType.ServiceIncident: - return "ServiceIncident"; - case IssueType.AppDeployment: - return "AppDeployment"; - case IssueType.AppCrash: - return "AppCrash"; - case IssueType.RuntimeIssueDetected: - return "RuntimeIssueDetected"; - case IssueType.AseDeployment: - return "AseDeployment"; - case IssueType.UserIssue: - return "UserIssue"; - case IssueType.PlatformIssue: - return "PlatformIssue"; - case IssueType.Other: - return "Other"; - } - return null; - } - - internal static IssueType? ParseIssueType(this string value) - { - switch( value ) - { - case "ServiceIncident": - return IssueType.ServiceIncident; - case "AppDeployment": - return IssueType.AppDeployment; - case "AppCrash": - return IssueType.AppCrash; - case "RuntimeIssueDetected": - return IssueType.RuntimeIssueDetected; - case "AseDeployment": - return IssueType.AseDeployment; - case "UserIssue": - return IssueType.UserIssue; - case "PlatformIssue": - return IssueType.PlatformIssue; - case "Other": - return IssueType.Other; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs deleted file mode 100644 index 987d77ff1840..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/JwtClaimChecks.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the checks that should be made while - /// validating the JWT Claims. - /// - public partial class JwtClaimChecks - { - /// - /// Initializes a new instance of the JwtClaimChecks class. - /// - public JwtClaimChecks() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the JwtClaimChecks class. - /// - /// The list of the allowed groups. - /// The list of the allowed - /// client applications. - public JwtClaimChecks(IList allowedGroups = default(IList), IList allowedClientApplications = default(IList)) - { - AllowedGroups = allowedGroups; - AllowedClientApplications = allowedClientApplications; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the list of the allowed groups. - /// - [JsonProperty(PropertyName = "allowedGroups")] - public IList AllowedGroups { get; set; } - - /// - /// Gets or sets the list of the allowed client applications. - /// - [JsonProperty(PropertyName = "allowedClientApplications")] - public IList AllowedClientApplications { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyInfo.cs deleted file mode 100644 index e4ca47f4d7b4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyInfo.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Function key info. - /// - public partial class KeyInfo - { - /// - /// Initializes a new instance of the KeyInfo class. - /// - public KeyInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the KeyInfo class. - /// - /// Key name - /// Key value - public KeyInfo(string name = default(string), string value = default(string)) - { - Name = name; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets key name - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets key value - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs deleted file mode 100644 index bcad1cb1452e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyValuePairStringObject.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class KeyValuePairStringObject - { - /// - /// Initializes a new instance of the KeyValuePairStringObject class. - /// - public KeyValuePairStringObject() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the KeyValuePairStringObject class. - /// - public KeyValuePairStringObject(string key = default(string), object value = default(object)) - { - Key = key; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "key")] - public string Key { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "value")] - public object Value { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyVaultSecretStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyVaultSecretStatus.cs deleted file mode 100644 index 1befa3ff39e1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KeyVaultSecretStatus.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for KeyVaultSecretStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KeyVaultSecretStatus - { - [EnumMember(Value = "Initialized")] - Initialized, - [EnumMember(Value = "WaitingOnCertificateOrder")] - WaitingOnCertificateOrder, - [EnumMember(Value = "Succeeded")] - Succeeded, - [EnumMember(Value = "CertificateOrderFailed")] - CertificateOrderFailed, - [EnumMember(Value = "OperationNotPermittedOnKeyVault")] - OperationNotPermittedOnKeyVault, - [EnumMember(Value = "AzureServiceUnauthorizedToAccessKeyVault")] - AzureServiceUnauthorizedToAccessKeyVault, - [EnumMember(Value = "KeyVaultDoesNotExist")] - KeyVaultDoesNotExist, - [EnumMember(Value = "KeyVaultSecretDoesNotExist")] - KeyVaultSecretDoesNotExist, - [EnumMember(Value = "UnknownError")] - UnknownError, - [EnumMember(Value = "ExternalPrivateKey")] - ExternalPrivateKey, - [EnumMember(Value = "Unknown")] - Unknown - } - internal static class KeyVaultSecretStatusEnumExtension - { - internal static string ToSerializedValue(this KeyVaultSecretStatus? value) - { - return value == null ? null : ((KeyVaultSecretStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this KeyVaultSecretStatus value) - { - switch( value ) - { - case KeyVaultSecretStatus.Initialized: - return "Initialized"; - case KeyVaultSecretStatus.WaitingOnCertificateOrder: - return "WaitingOnCertificateOrder"; - case KeyVaultSecretStatus.Succeeded: - return "Succeeded"; - case KeyVaultSecretStatus.CertificateOrderFailed: - return "CertificateOrderFailed"; - case KeyVaultSecretStatus.OperationNotPermittedOnKeyVault: - return "OperationNotPermittedOnKeyVault"; - case KeyVaultSecretStatus.AzureServiceUnauthorizedToAccessKeyVault: - return "AzureServiceUnauthorizedToAccessKeyVault"; - case KeyVaultSecretStatus.KeyVaultDoesNotExist: - return "KeyVaultDoesNotExist"; - case KeyVaultSecretStatus.KeyVaultSecretDoesNotExist: - return "KeyVaultSecretDoesNotExist"; - case KeyVaultSecretStatus.UnknownError: - return "UnknownError"; - case KeyVaultSecretStatus.ExternalPrivateKey: - return "ExternalPrivateKey"; - case KeyVaultSecretStatus.Unknown: - return "Unknown"; - } - return null; - } - - internal static KeyVaultSecretStatus? ParseKeyVaultSecretStatus(this string value) - { - switch( value ) - { - case "Initialized": - return KeyVaultSecretStatus.Initialized; - case "WaitingOnCertificateOrder": - return KeyVaultSecretStatus.WaitingOnCertificateOrder; - case "Succeeded": - return KeyVaultSecretStatus.Succeeded; - case "CertificateOrderFailed": - return KeyVaultSecretStatus.CertificateOrderFailed; - case "OperationNotPermittedOnKeyVault": - return KeyVaultSecretStatus.OperationNotPermittedOnKeyVault; - case "AzureServiceUnauthorizedToAccessKeyVault": - return KeyVaultSecretStatus.AzureServiceUnauthorizedToAccessKeyVault; - case "KeyVaultDoesNotExist": - return KeyVaultSecretStatus.KeyVaultDoesNotExist; - case "KeyVaultSecretDoesNotExist": - return KeyVaultSecretStatus.KeyVaultSecretDoesNotExist; - case "UnknownError": - return KeyVaultSecretStatus.UnknownError; - case "ExternalPrivateKey": - return KeyVaultSecretStatus.ExternalPrivateKey; - case "Unknown": - return KeyVaultSecretStatus.Unknown; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs deleted file mode 100644 index f51515869ecf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironment.cs +++ /dev/null @@ -1,178 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A Kubernetes cluster specialized for web workloads by Azure App Service - /// - [Rest.Serialization.JsonTransformation] - public partial class KubeEnvironment : Resource - { - /// - /// Initializes a new instance of the KubeEnvironment class. - /// - public KubeEnvironment() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the KubeEnvironment class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Provisioning state of the - /// Kubernetes Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', - /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', - /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' - /// Any errors that occurred during - /// deployment or deployment validation - /// Only visible within - /// Vnet/Subnet - /// Default Domain Name for the - /// cluster - /// Static IP of the KubeEnvironment - /// Type of Kubernetes Environment. Only - /// supported for Container App Environments with value as - /// Managed - /// Cluster configuration which - /// determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// Cluster configuration which - /// enables the log daemon to export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// Cluster configuration for - /// Container Apps Environments to configure Dapr Instrumentation Key - /// and VNET Configuration - public KubeEnvironment(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), string environmentType = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), ContainerAppsConfiguration containerAppsConfiguration = default(ContainerAppsConfiguration), string aksResourceID = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation)) - : base(location, id, name, kind, type, tags) - { - ProvisioningState = provisioningState; - DeploymentErrors = deploymentErrors; - InternalLoadBalancerEnabled = internalLoadBalancerEnabled; - DefaultDomain = defaultDomain; - StaticIp = staticIp; - EnvironmentType = environmentType; - ArcConfiguration = arcConfiguration; - AppLogsConfiguration = appLogsConfiguration; - ContainerAppsConfiguration = containerAppsConfiguration; - AksResourceID = aksResourceID; - ExtendedLocation = extendedLocation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the Kubernetes Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', - /// 'InitializationInProgress', 'InfrastructureSetupInProgress', - /// 'InfrastructureSetupComplete', 'ScheduledForDelete', - /// 'UpgradeRequested', 'UpgradeFailed' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets any errors that occurred during deployment or deployment - /// validation - /// - [JsonProperty(PropertyName = "properties.deploymentErrors")] - public string DeploymentErrors { get; private set; } - - /// - /// Gets or sets only visible within Vnet/Subnet - /// - [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] - public bool? InternalLoadBalancerEnabled { get; set; } - - /// - /// Gets default Domain Name for the cluster - /// - [JsonProperty(PropertyName = "properties.defaultDomain")] - public string DefaultDomain { get; private set; } - - /// - /// Gets or sets static IP of the KubeEnvironment - /// - [JsonProperty(PropertyName = "properties.staticIp")] - public string StaticIp { get; set; } - - /// - /// Gets or sets type of Kubernetes Environment. Only supported for - /// Container App Environments with value as Managed - /// - [JsonProperty(PropertyName = "properties.environmentType")] - public string EnvironmentType { get; set; } - - /// - /// Gets or sets cluster configuration which determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// - [JsonProperty(PropertyName = "properties.arcConfiguration")] - public ArcConfiguration ArcConfiguration { get; set; } - - /// - /// Gets or sets cluster configuration which enables the log daemon to - /// export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// - [JsonProperty(PropertyName = "properties.appLogsConfiguration")] - public AppLogsConfiguration AppLogsConfiguration { get; set; } - - /// - /// Gets or sets cluster configuration for Container Apps Environments - /// to configure Dapr Instrumentation Key and VNET Configuration - /// - [JsonProperty(PropertyName = "properties.containerAppsConfiguration")] - public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.aksResourceID")] - public string AksResourceID { get; set; } - - /// - /// - [JsonProperty(PropertyName = "extendedLocation")] - public ExtendedLocation ExtendedLocation { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs deleted file mode 100644 index bb870d44def5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentPatchResource.cs +++ /dev/null @@ -1,149 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM resource for a KubeEnvironment when patching - /// - [Rest.Serialization.JsonTransformation] - public partial class KubeEnvironmentPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the KubeEnvironmentPatchResource - /// class. - /// - public KubeEnvironmentPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the KubeEnvironmentPatchResource - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Provisioning state of the - /// Kubernetes Environment. Possible values include: 'Succeeded', - /// 'Failed', 'Canceled', 'Waiting', 'InitializationInProgress', - /// 'InfrastructureSetupInProgress', 'InfrastructureSetupComplete', - /// 'ScheduledForDelete', 'UpgradeRequested', 'UpgradeFailed' - /// Any errors that occurred during - /// deployment or deployment validation - /// Only visible within - /// Vnet/Subnet - /// Default Domain Name for the - /// cluster - /// Static IP of the KubeEnvironment - /// Cluster configuration which - /// determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// Cluster configuration which - /// enables the log daemon to export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// Cluster configuration for - /// Container Apps Environments to configure Dapr Instrumentation Key - /// and VNET Configuration - public KubeEnvironmentPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), KubeEnvironmentProvisioningState? provisioningState = default(KubeEnvironmentProvisioningState?), string deploymentErrors = default(string), bool? internalLoadBalancerEnabled = default(bool?), string defaultDomain = default(string), string staticIp = default(string), ArcConfiguration arcConfiguration = default(ArcConfiguration), AppLogsConfiguration appLogsConfiguration = default(AppLogsConfiguration), ContainerAppsConfiguration containerAppsConfiguration = default(ContainerAppsConfiguration), string aksResourceID = default(string)) - : base(id, name, kind, type) - { - ProvisioningState = provisioningState; - DeploymentErrors = deploymentErrors; - InternalLoadBalancerEnabled = internalLoadBalancerEnabled; - DefaultDomain = defaultDomain; - StaticIp = staticIp; - ArcConfiguration = arcConfiguration; - AppLogsConfiguration = appLogsConfiguration; - ContainerAppsConfiguration = containerAppsConfiguration; - AksResourceID = aksResourceID; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets provisioning state of the Kubernetes Environment. Possible - /// values include: 'Succeeded', 'Failed', 'Canceled', 'Waiting', - /// 'InitializationInProgress', 'InfrastructureSetupInProgress', - /// 'InfrastructureSetupComplete', 'ScheduledForDelete', - /// 'UpgradeRequested', 'UpgradeFailed' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public KubeEnvironmentProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets any errors that occurred during deployment or deployment - /// validation - /// - [JsonProperty(PropertyName = "properties.deploymentErrors")] - public string DeploymentErrors { get; private set; } - - /// - /// Gets or sets only visible within Vnet/Subnet - /// - [JsonProperty(PropertyName = "properties.internalLoadBalancerEnabled")] - public bool? InternalLoadBalancerEnabled { get; set; } - - /// - /// Gets default Domain Name for the cluster - /// - [JsonProperty(PropertyName = "properties.defaultDomain")] - public string DefaultDomain { get; private set; } - - /// - /// Gets or sets static IP of the KubeEnvironment - /// - [JsonProperty(PropertyName = "properties.staticIp")] - public string StaticIp { get; set; } - - /// - /// Gets or sets cluster configuration which determines the ARC cluster - /// components types. Eg: Choosing between BuildService kind, - /// FrontEnd Service ArtifactsStorageType etc. - /// - [JsonProperty(PropertyName = "properties.arcConfiguration")] - public ArcConfiguration ArcConfiguration { get; set; } - - /// - /// Gets or sets cluster configuration which enables the log daemon to - /// export - /// app logs to a destination. Currently only "log-analytics" is - /// supported - /// - [JsonProperty(PropertyName = "properties.appLogsConfiguration")] - public AppLogsConfiguration AppLogsConfiguration { get; set; } - - /// - /// Gets or sets cluster configuration for Container Apps Environments - /// to configure Dapr Instrumentation Key and VNET Configuration - /// - [JsonProperty(PropertyName = "properties.containerAppsConfiguration")] - public ContainerAppsConfiguration ContainerAppsConfiguration { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.aksResourceID")] - public string AksResourceID { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs deleted file mode 100644 index 9153aca339a0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProfile.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specification for a Kubernetes Environment to use for this resource. - /// - public partial class KubeEnvironmentProfile - { - /// - /// Initializes a new instance of the KubeEnvironmentProfile class. - /// - public KubeEnvironmentProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the KubeEnvironmentProfile class. - /// - /// Resource ID of the Kubernetes Environment. - /// Name of the Kubernetes Environment. - /// Resource type of the Kubernetes - /// Environment. - public KubeEnvironmentProfile(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 or sets resource ID of the Kubernetes Environment. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets name of the Kubernetes Environment. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets resource type of the Kubernetes Environment. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs deleted file mode 100644 index 46249dd6048b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/KubeEnvironmentProvisioningState.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for KubeEnvironmentProvisioningState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KubeEnvironmentProvisioningState - { - [EnumMember(Value = "Succeeded")] - Succeeded, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Canceled")] - Canceled, - [EnumMember(Value = "Waiting")] - Waiting, - [EnumMember(Value = "InitializationInProgress")] - InitializationInProgress, - [EnumMember(Value = "InfrastructureSetupInProgress")] - InfrastructureSetupInProgress, - [EnumMember(Value = "InfrastructureSetupComplete")] - InfrastructureSetupComplete, - [EnumMember(Value = "ScheduledForDelete")] - ScheduledForDelete, - [EnumMember(Value = "UpgradeRequested")] - UpgradeRequested, - [EnumMember(Value = "UpgradeFailed")] - UpgradeFailed - } - internal static class KubeEnvironmentProvisioningStateEnumExtension - { - internal static string ToSerializedValue(this KubeEnvironmentProvisioningState? value) - { - return value == null ? null : ((KubeEnvironmentProvisioningState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this KubeEnvironmentProvisioningState value) - { - switch( value ) - { - case KubeEnvironmentProvisioningState.Succeeded: - return "Succeeded"; - case KubeEnvironmentProvisioningState.Failed: - return "Failed"; - case KubeEnvironmentProvisioningState.Canceled: - return "Canceled"; - case KubeEnvironmentProvisioningState.Waiting: - return "Waiting"; - case KubeEnvironmentProvisioningState.InitializationInProgress: - return "InitializationInProgress"; - case KubeEnvironmentProvisioningState.InfrastructureSetupInProgress: - return "InfrastructureSetupInProgress"; - case KubeEnvironmentProvisioningState.InfrastructureSetupComplete: - return "InfrastructureSetupComplete"; - case KubeEnvironmentProvisioningState.ScheduledForDelete: - return "ScheduledForDelete"; - case KubeEnvironmentProvisioningState.UpgradeRequested: - return "UpgradeRequested"; - case KubeEnvironmentProvisioningState.UpgradeFailed: - return "UpgradeFailed"; - } - return null; - } - - internal static KubeEnvironmentProvisioningState? ParseKubeEnvironmentProvisioningState(this string value) - { - switch( value ) - { - case "Succeeded": - return KubeEnvironmentProvisioningState.Succeeded; - case "Failed": - return KubeEnvironmentProvisioningState.Failed; - case "Canceled": - return KubeEnvironmentProvisioningState.Canceled; - case "Waiting": - return KubeEnvironmentProvisioningState.Waiting; - case "InitializationInProgress": - return KubeEnvironmentProvisioningState.InitializationInProgress; - case "InfrastructureSetupInProgress": - return KubeEnvironmentProvisioningState.InfrastructureSetupInProgress; - case "InfrastructureSetupComplete": - return KubeEnvironmentProvisioningState.InfrastructureSetupComplete; - case "ScheduledForDelete": - return KubeEnvironmentProvisioningState.ScheduledForDelete; - case "UpgradeRequested": - return KubeEnvironmentProvisioningState.UpgradeRequested; - case "UpgradeFailed": - return KubeEnvironmentProvisioningState.UpgradeFailed; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs deleted file mode 100644 index 40b3d2973b88..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LegacyMicrosoftAccount.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the legacy Microsoft Account provider. - /// - public partial class LegacyMicrosoftAccount - { - /// - /// Initializes a new instance of the LegacyMicrosoftAccount class. - /// - public LegacyMicrosoftAccount() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LegacyMicrosoftAccount class. - /// - /// <code>false</code> if the legacy - /// Microsoft Account provider should not be enabled despite the set - /// registration; otherwise, <code>true</code>. - /// The configuration settings of the app - /// registration for the legacy Microsoft Account provider. - /// The configuration settings of the login - /// flow. - /// The configuration settings of the legacy - /// Microsoft Account provider token validation flow. - public LegacyMicrosoftAccount(bool? enabled = default(bool?), ClientRegistration registration = default(ClientRegistration), LoginScopes login = default(LoginScopes), AllowedAudiencesValidation validation = default(AllowedAudiencesValidation)) - { - Enabled = enabled; - Registration = registration; - Login = login; - Validation = validation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// legacy Microsoft Account provider should not be enabled despite the - /// set registration; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the legacy Microsoft Account provider. - /// - [JsonProperty(PropertyName = "registration")] - public ClientRegistration Registration { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow. - /// - [JsonProperty(PropertyName = "login")] - public LoginScopes Login { get; set; } - - /// - /// Gets or sets the configuration settings of the legacy Microsoft - /// Account provider token validation flow. - /// - [JsonProperty(PropertyName = "validation")] - public AllowedAudiencesValidation Validation { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs deleted file mode 100644 index 7abd94c002c7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LinuxJavaContainerSettings.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Linux Java Container settings. - /// - public partial class LinuxJavaContainerSettings - { - /// - /// Initializes a new instance of the LinuxJavaContainerSettings class. - /// - public LinuxJavaContainerSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LinuxJavaContainerSettings class. - /// - /// Java 11 version (runtime only). - /// Java 8 version (runtime only). - /// <code>true</code> if the stack - /// is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the - /// stack is deprecated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the stack - /// should be hidden; otherwise, - /// <code>false</code>. - /// End-of-life date for the minor - /// version. - /// <code>true</code> if the - /// stack version is auto-updated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the - /// minor version is early-access; otherwise, - /// <code>false</code>. - public LinuxJavaContainerSettings(string java11Runtime = default(string), string java8Runtime = default(string), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) - { - Java11Runtime = java11Runtime; - Java8Runtime = java8Runtime; - IsPreview = isPreview; - IsDeprecated = isDeprecated; - IsHidden = isHidden; - EndOfLifeDate = endOfLifeDate; - IsAutoUpdate = isAutoUpdate; - IsEarlyAccess = isEarlyAccess; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets java 11 version (runtime only). - /// - [JsonProperty(PropertyName = "java11Runtime")] - public string Java11Runtime { get; private set; } - - /// - /// Gets java 8 version (runtime only). - /// - [JsonProperty(PropertyName = "java8Runtime")] - public string Java8Runtime { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// in preview; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public bool? IsDeprecated { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// should be hidden; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isHidden")] - public bool? IsHidden { get; private set; } - - /// - /// Gets end-of-life date for the minor version. - /// - [JsonProperty(PropertyName = "endOfLifeDate")] - public System.DateTime? EndOfLifeDate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// version is auto-updated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isAutoUpdate")] - public bool? IsAutoUpdate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the minor - /// version is early-access; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isEarlyAccess")] - public bool? IsEarlyAccess { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs deleted file mode 100644 index b635569ca214..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoadBalancingMode.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for LoadBalancingMode. - /// - public static class LoadBalancingMode - { - public const string None = "None"; - public const string Web = "Web"; - public const string Publishing = "Publishing"; - public const string WebPublishing = "Web, Publishing"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LocalizableString.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LocalizableString.cs deleted file mode 100644 index 508f794e803a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LocalizableString.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Localizable string object containing the name and a localized value. - /// - public partial class LocalizableString - { - /// - /// Initializes a new instance of the LocalizableString class. - /// - public LocalizableString() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LocalizableString class. - /// - /// Non-localized name. - /// Localized name. - public LocalizableString(string value = default(string), string localizedValue = default(string)) - { - Value = value; - LocalizedValue = localizedValue; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets non-localized name. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - /// - /// Gets or sets localized name. - /// - [JsonProperty(PropertyName = "localizedValue")] - public string LocalizedValue { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs deleted file mode 100644 index c2a3350d2da9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogAnalyticsConfiguration.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class LogAnalyticsConfiguration - { - /// - /// Initializes a new instance of the LogAnalyticsConfiguration class. - /// - public LogAnalyticsConfiguration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LogAnalyticsConfiguration class. - /// - public LogAnalyticsConfiguration(string customerId = default(string), string sharedKey = default(string)) - { - CustomerId = customerId; - SharedKey = sharedKey; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "customerId")] - public string CustomerId { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sharedKey")] - public string SharedKey { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogLevel.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogLevel.cs deleted file mode 100644 index 189524b78a3b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogLevel.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for LogLevel. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LogLevel - { - [EnumMember(Value = "Off")] - Off, - [EnumMember(Value = "Verbose")] - Verbose, - [EnumMember(Value = "Information")] - Information, - [EnumMember(Value = "Warning")] - Warning, - [EnumMember(Value = "Error")] - Error - } - internal static class LogLevelEnumExtension - { - internal static string ToSerializedValue(this LogLevel? value) - { - return value == null ? null : ((LogLevel)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this LogLevel value) - { - switch( value ) - { - case LogLevel.Off: - return "Off"; - case LogLevel.Verbose: - return "Verbose"; - case LogLevel.Information: - return "Information"; - case LogLevel.Warning: - return "Warning"; - case LogLevel.Error: - return "Error"; - } - return null; - } - - internal static LogLevel? ParseLogLevel(this string value) - { - switch( value ) - { - case "Off": - return LogLevel.Off; - case "Verbose": - return LogLevel.Verbose; - case "Information": - return LogLevel.Information; - case "Warning": - return LogLevel.Warning; - case "Error": - return LogLevel.Error; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogSpecification.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogSpecification.cs deleted file mode 100644 index 3fe115f18908..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LogSpecification.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Log Definition of a single resource metric. - /// - public partial class LogSpecification - { - /// - /// Initializes a new instance of the LogSpecification class. - /// - public LogSpecification() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LogSpecification class. - /// - public LogSpecification(string name = default(string), string displayName = default(string), string blobDuration = default(string), string logFilterPattern = default(string)) - { - Name = name; - DisplayName = displayName; - BlobDuration = blobDuration; - LogFilterPattern = logFilterPattern; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "blobDuration")] - public string BlobDuration { get; set; } - - /// - /// - [JsonProperty(PropertyName = "logFilterPattern")] - public string LogFilterPattern { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs deleted file mode 100644 index 8a207a74c728..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Login.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the login flow of users using App Service - /// Authentication/Authorization. - /// - public partial class Login - { - /// - /// Initializes a new instance of the Login class. - /// - public Login() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Login class. - /// - /// The routes that specify the endpoints used for - /// login and logout requests. - /// The configuration settings of the token - /// store. - /// <code>true</code> - /// if the fragments from the request are preserved after the login - /// request is made; otherwise, <code>false</code>. - /// External URLs that can be - /// redirected to as part of logging in or logging out of the app. Note - /// that the query string part of the URL is ignored. - /// This is an advanced setting typically only needed by Windows Store - /// application backends. - /// Note that URLs within the current domain are always implicitly - /// allowed. - /// The configuration settings of the - /// session cookie's expiration. - /// The configuration settings of the nonce used in - /// the login flow. - public Login(LoginRoutes routes = default(LoginRoutes), TokenStore tokenStore = default(TokenStore), bool? preserveUrlFragmentsForLogins = default(bool?), IList allowedExternalRedirectUrls = default(IList), CookieExpiration cookieExpiration = default(CookieExpiration), Nonce nonce = default(Nonce)) - { - Routes = routes; - TokenStore = tokenStore; - PreserveUrlFragmentsForLogins = preserveUrlFragmentsForLogins; - AllowedExternalRedirectUrls = allowedExternalRedirectUrls; - CookieExpiration = cookieExpiration; - Nonce = nonce; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the routes that specify the endpoints used for login - /// and logout requests. - /// - [JsonProperty(PropertyName = "routes")] - public LoginRoutes Routes { get; set; } - - /// - /// Gets or sets the configuration settings of the token store. - /// - [JsonProperty(PropertyName = "tokenStore")] - public TokenStore TokenStore { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// fragments from the request are preserved after the login request is - /// made; otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "preserveUrlFragmentsForLogins")] - public bool? PreserveUrlFragmentsForLogins { get; set; } - - /// - /// Gets or sets external URLs that can be redirected to as part of - /// logging in or logging out of the app. Note that the query string - /// part of the URL is ignored. - /// This is an advanced setting typically only needed by Windows Store - /// application backends. - /// Note that URLs within the current domain are always implicitly - /// allowed. - /// - [JsonProperty(PropertyName = "allowedExternalRedirectUrls")] - public IList AllowedExternalRedirectUrls { get; set; } - - /// - /// Gets or sets the configuration settings of the session cookie's - /// expiration. - /// - [JsonProperty(PropertyName = "cookieExpiration")] - public CookieExpiration CookieExpiration { get; set; } - - /// - /// Gets or sets the configuration settings of the nonce used in the - /// login flow. - /// - [JsonProperty(PropertyName = "nonce")] - public Nonce Nonce { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs deleted file mode 100644 index a2a1c6a282a2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginRoutes.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The routes that specify the endpoints used for login and logout - /// requests. - /// - public partial class LoginRoutes - { - /// - /// Initializes a new instance of the LoginRoutes class. - /// - public LoginRoutes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LoginRoutes class. - /// - /// The endpoint at which a logout request - /// should be made. - public LoginRoutes(string logoutEndpoint = default(string)) - { - LogoutEndpoint = logoutEndpoint; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the endpoint at which a logout request should be made. - /// - [JsonProperty(PropertyName = "logoutEndpoint")] - public string LogoutEndpoint { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs deleted file mode 100644 index ad066f1a7e3e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/LoginScopes.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the login flow, including the scopes that - /// should be requested. - /// - public partial class LoginScopes - { - /// - /// Initializes a new instance of the LoginScopes class. - /// - public LoginScopes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the LoginScopes class. - /// - /// A list of the scopes that should be requested - /// while authenticating. - public LoginScopes(IList scopes = default(IList)) - { - Scopes = scopes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a list of the scopes that should be requested while - /// authenticating. - /// - [JsonProperty(PropertyName = "scopes")] - public IList Scopes { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeploy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeploy.cs deleted file mode 100644 index 2a601fc13092..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeploy.cs +++ /dev/null @@ -1,131 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// MSDeploy ARM PUT information - /// - [Rest.Serialization.JsonTransformation] - public partial class MSDeploy : ProxyOnlyResource - { - /// - /// Initializes a new instance of the MSDeploy class. - /// - public MSDeploy() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSDeploy class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Package URI - /// SQL Connection String - /// Database Type - /// URI of MSDeploy Parameters - /// file. Must not be set if SetParameters is used. - /// MSDeploy Parameters. Must not be set if - /// SetParametersXmlFileUri is used. - /// Controls whether the MSDeploy operation - /// skips the App_Data directory. - /// If set to <code>true</code>, the existing App_Data - /// directory on the destination - /// will not be deleted, and any App_Data directory in the source will - /// be ignored. - /// Setting is <code>false</code> by default. - /// Sets the AppOffline rule while the - /// MSDeploy operation executes. - /// Setting is <code>false</code> by default. - public MSDeploy(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string packageUri = default(string), string connectionString = default(string), string dbType = default(string), string setParametersXmlFileUri = default(string), IDictionary setParameters = default(IDictionary), bool? skipAppData = default(bool?), bool? appOffline = default(bool?)) - : base(id, name, kind, type) - { - PackageUri = packageUri; - ConnectionString = connectionString; - DbType = dbType; - SetParametersXmlFileUri = setParametersXmlFileUri; - SetParameters = setParameters; - SkipAppData = skipAppData; - AppOffline = appOffline; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets package URI - /// - [JsonProperty(PropertyName = "properties.packageUri")] - public string PackageUri { get; set; } - - /// - /// Gets or sets SQL Connection String - /// - [JsonProperty(PropertyName = "properties.connectionString")] - public string ConnectionString { get; set; } - - /// - /// Gets or sets database Type - /// - [JsonProperty(PropertyName = "properties.dbType")] - public string DbType { get; set; } - - /// - /// Gets or sets URI of MSDeploy Parameters file. Must not be set if - /// SetParameters is used. - /// - [JsonProperty(PropertyName = "properties.setParametersXmlFileUri")] - public string SetParametersXmlFileUri { get; set; } - - /// - /// Gets or sets mSDeploy Parameters. Must not be set if - /// SetParametersXmlFileUri is used. - /// - [JsonProperty(PropertyName = "properties.setParameters")] - public IDictionary SetParameters { get; set; } - - /// - /// Gets or sets controls whether the MSDeploy operation skips the - /// App_Data directory. - /// If set to &lt;code&gt;true&lt;/code&gt;, the - /// existing App_Data directory on the destination - /// will not be deleted, and any App_Data directory in the source will - /// be ignored. - /// Setting is &lt;code&gt;false&lt;/code&gt; by - /// default. - /// - [JsonProperty(PropertyName = "properties.skipAppData")] - public bool? SkipAppData { get; set; } - - /// - /// Gets or sets sets the AppOffline rule while the MSDeploy operation - /// executes. - /// Setting is &lt;code&gt;false&lt;/code&gt; by - /// default. - /// - [JsonProperty(PropertyName = "properties.appOffline")] - public bool? AppOffline { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLog.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLog.cs deleted file mode 100644 index b98032e54b1e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLog.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// MSDeploy log - /// - [Rest.Serialization.JsonTransformation] - public partial class MSDeployLog : ProxyOnlyResource - { - /// - /// Initializes a new instance of the MSDeployLog class. - /// - public MSDeployLog() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSDeployLog class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// List of log entry messages - public MSDeployLog(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList entries = default(IList)) - : base(id, name, kind, type) - { - Entries = entries; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets list of log entry messages - /// - [JsonProperty(PropertyName = "properties.entries")] - public IList Entries { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntry.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntry.cs deleted file mode 100644 index f8fa05c9d688..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntry.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// MSDeploy log entry - /// - public partial class MSDeployLogEntry - { - /// - /// Initializes a new instance of the MSDeployLogEntry class. - /// - public MSDeployLogEntry() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSDeployLogEntry class. - /// - /// Timestamp of log entry - /// Log entry type. Possible values include: - /// 'Message', 'Warning', 'Error' - /// Log entry message - public MSDeployLogEntry(System.DateTime? time = default(System.DateTime?), MSDeployLogEntryType? type = default(MSDeployLogEntryType?), string message = default(string)) - { - Time = time; - Type = type; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets timestamp of log entry - /// - [JsonProperty(PropertyName = "time")] - public System.DateTime? Time { get; private set; } - - /// - /// Gets log entry type. Possible values include: 'Message', 'Warning', - /// 'Error' - /// - [JsonProperty(PropertyName = "type")] - public MSDeployLogEntryType? Type { get; private set; } - - /// - /// Gets log entry message - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntryType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntryType.cs deleted file mode 100644 index aabc6ea359b2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployLogEntryType.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for MSDeployLogEntryType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MSDeployLogEntryType - { - [EnumMember(Value = "Message")] - Message, - [EnumMember(Value = "Warning")] - Warning, - [EnumMember(Value = "Error")] - Error - } - internal static class MSDeployLogEntryTypeEnumExtension - { - internal static string ToSerializedValue(this MSDeployLogEntryType? value) - { - return value == null ? null : ((MSDeployLogEntryType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this MSDeployLogEntryType value) - { - switch( value ) - { - case MSDeployLogEntryType.Message: - return "Message"; - case MSDeployLogEntryType.Warning: - return "Warning"; - case MSDeployLogEntryType.Error: - return "Error"; - } - return null; - } - - internal static MSDeployLogEntryType? ParseMSDeployLogEntryType(this string value) - { - switch( value ) - { - case "Message": - return MSDeployLogEntryType.Message; - case "Warning": - return MSDeployLogEntryType.Warning; - case "Error": - return MSDeployLogEntryType.Error; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployProvisioningState.cs deleted file mode 100644 index 80c9344125eb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployProvisioningState.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for MSDeployProvisioningState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MSDeployProvisioningState - { - [EnumMember(Value = "accepted")] - Accepted, - [EnumMember(Value = "running")] - Running, - [EnumMember(Value = "succeeded")] - Succeeded, - [EnumMember(Value = "failed")] - Failed, - [EnumMember(Value = "canceled")] - Canceled - } - internal static class MSDeployProvisioningStateEnumExtension - { - internal static string ToSerializedValue(this MSDeployProvisioningState? value) - { - return value == null ? null : ((MSDeployProvisioningState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this MSDeployProvisioningState value) - { - switch( value ) - { - case MSDeployProvisioningState.Accepted: - return "accepted"; - case MSDeployProvisioningState.Running: - return "running"; - case MSDeployProvisioningState.Succeeded: - return "succeeded"; - case MSDeployProvisioningState.Failed: - return "failed"; - case MSDeployProvisioningState.Canceled: - return "canceled"; - } - return null; - } - - internal static MSDeployProvisioningState? ParseMSDeployProvisioningState(this string value) - { - switch( value ) - { - case "accepted": - return MSDeployProvisioningState.Accepted; - case "running": - return MSDeployProvisioningState.Running; - case "succeeded": - return MSDeployProvisioningState.Succeeded; - case "failed": - return MSDeployProvisioningState.Failed; - case "canceled": - return MSDeployProvisioningState.Canceled; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployStatus.cs deleted file mode 100644 index 32175ea1230d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MSDeployStatus.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// MSDeploy ARM response - /// - [Rest.Serialization.JsonTransformation] - public partial class MSDeployStatus : ProxyOnlyResource - { - /// - /// Initializes a new instance of the MSDeployStatus class. - /// - public MSDeployStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MSDeployStatus class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Username of deployer - /// Provisioning state. Possible values - /// include: 'accepted', 'running', 'succeeded', 'failed', - /// 'canceled' - /// Start time of deploy operation - /// End time of deploy operation - /// Whether the deployment operation has - /// completed - public MSDeployStatus(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string deployer = default(string), MSDeployProvisioningState? provisioningState = default(MSDeployProvisioningState?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), bool? complete = default(bool?)) - : base(id, name, kind, type) - { - Deployer = deployer; - ProvisioningState = provisioningState; - StartTime = startTime; - EndTime = endTime; - Complete = complete; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets username of deployer - /// - [JsonProperty(PropertyName = "properties.deployer")] - public string Deployer { get; private set; } - - /// - /// Gets provisioning state. Possible values include: 'accepted', - /// 'running', 'succeeded', 'failed', 'canceled' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public MSDeployProvisioningState? ProvisioningState { get; private set; } - - /// - /// Gets start time of deploy operation - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; private set; } - - /// - /// Gets end time of deploy operation - /// - [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; private set; } - - /// - /// Gets whether the deployment operation has completed - /// - [JsonProperty(PropertyName = "properties.complete")] - public bool? Complete { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedPipelineMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedPipelineMode.cs deleted file mode 100644 index 8eca0a3c40b3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedPipelineMode.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ManagedPipelineMode. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ManagedPipelineMode - { - [EnumMember(Value = "Integrated")] - Integrated, - [EnumMember(Value = "Classic")] - Classic - } - internal static class ManagedPipelineModeEnumExtension - { - internal static string ToSerializedValue(this ManagedPipelineMode? value) - { - return value == null ? null : ((ManagedPipelineMode)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ManagedPipelineMode value) - { - switch( value ) - { - case ManagedPipelineMode.Integrated: - return "Integrated"; - case ManagedPipelineMode.Classic: - return "Classic"; - } - return null; - } - - internal static ManagedPipelineMode? ParseManagedPipelineMode(this string value) - { - switch( value ) - { - case "Integrated": - return ManagedPipelineMode.Integrated; - case "Classic": - return ManagedPipelineMode.Classic; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs deleted file mode 100644 index 7f08f9d1ee37..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentity.cs +++ /dev/null @@ -1,88 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Managed service identity. - /// - public partial class ManagedServiceIdentity - { - /// - /// Initializes a new instance of the ManagedServiceIdentity class. - /// - public ManagedServiceIdentity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ManagedServiceIdentity class. - /// - /// Type of managed service identity. Possible - /// values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - /// UserAssigned', 'None' - /// Tenant of managed service identity. - /// Principal Id of managed service - /// identity. - /// The list of user assigned - /// identities associated with the resource. The user identity - /// dictionary key references will be ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - public ManagedServiceIdentity(ManagedServiceIdentityType? type = default(ManagedServiceIdentityType?), string tenantId = default(string), string principalId = default(string), IDictionary userAssignedIdentities = default(IDictionary)) - { - Type = type; - TenantId = tenantId; - PrincipalId = principalId; - UserAssignedIdentities = userAssignedIdentities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets type of managed service identity. Possible values - /// include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, - /// UserAssigned', 'None' - /// - [JsonProperty(PropertyName = "type")] - public ManagedServiceIdentityType? Type { get; set; } - - /// - /// Gets tenant of managed service identity. - /// - [JsonProperty(PropertyName = "tenantId")] - public string TenantId { get; private set; } - - /// - /// Gets principal Id of managed service identity. - /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } - - /// - /// Gets or sets the list of user assigned identities associated with - /// the resource. The user identity dictionary key references will be - /// ARM resource ids in the form: - /// '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName} - /// - [JsonProperty(PropertyName = "userAssignedIdentities")] - public IDictionary UserAssignedIdentities { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityType.cs deleted file mode 100644 index c03bf44b3d17..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ManagedServiceIdentityType.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ManagedServiceIdentityType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ManagedServiceIdentityType - { - [EnumMember(Value = "SystemAssigned")] - SystemAssigned, - [EnumMember(Value = "UserAssigned")] - UserAssigned, - [EnumMember(Value = "SystemAssigned, UserAssigned")] - SystemAssignedUserAssigned, - [EnumMember(Value = "None")] - None - } - internal static class ManagedServiceIdentityTypeEnumExtension - { - internal static string ToSerializedValue(this ManagedServiceIdentityType? value) - { - return value == null ? null : ((ManagedServiceIdentityType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ManagedServiceIdentityType value) - { - switch( value ) - { - case ManagedServiceIdentityType.SystemAssigned: - return "SystemAssigned"; - case ManagedServiceIdentityType.UserAssigned: - return "UserAssigned"; - case ManagedServiceIdentityType.SystemAssignedUserAssigned: - return "SystemAssigned, UserAssigned"; - case ManagedServiceIdentityType.None: - return "None"; - } - return null; - } - - internal static ManagedServiceIdentityType? ParseManagedServiceIdentityType(this string value) - { - switch( value ) - { - case "SystemAssigned": - return ManagedServiceIdentityType.SystemAssigned; - case "UserAssigned": - return ManagedServiceIdentityType.UserAssigned; - case "SystemAssigned, UserAssigned": - return ManagedServiceIdentityType.SystemAssignedUserAssigned; - case "None": - return ManagedServiceIdentityType.None; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricAvailability.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricAvailability.cs deleted file mode 100644 index c66947cdbd0a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricAvailability.cs +++ /dev/null @@ -1,55 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Retention policy of a resource metric. - /// - public partial class MetricAvailability - { - /// - /// Initializes a new instance of the MetricAvailability class. - /// - public MetricAvailability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetricAvailability class. - /// - public MetricAvailability(string timeGrain = default(string), string blobDuration = default(string)) - { - TimeGrain = timeGrain; - BlobDuration = blobDuration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "timeGrain")] - public string TimeGrain { get; set; } - - /// - /// - [JsonProperty(PropertyName = "blobDuration")] - public string BlobDuration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricSpecification.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricSpecification.cs deleted file mode 100644 index 38a0c42b3359..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MetricSpecification.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Definition of a single resource metric. - /// - public partial class MetricSpecification - { - /// - /// Initializes a new instance of the MetricSpecification class. - /// - public MetricSpecification() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MetricSpecification class. - /// - public MetricSpecification(string name = default(string), string displayName = default(string), string displayDescription = default(string), string unit = default(string), string aggregationType = default(string), bool? supportsInstanceLevelAggregation = default(bool?), bool? enableRegionalMdmAccount = default(bool?), string sourceMdmAccount = default(string), string sourceMdmNamespace = default(string), string metricFilterPattern = default(string), bool? fillGapWithZero = default(bool?), bool? isInternal = default(bool?), IList dimensions = default(IList), string category = default(string), IList availabilities = default(IList), IList supportedTimeGrainTypes = default(IList), IList supportedAggregationTypes = default(IList)) - { - Name = name; - DisplayName = displayName; - DisplayDescription = displayDescription; - Unit = unit; - AggregationType = aggregationType; - SupportsInstanceLevelAggregation = supportsInstanceLevelAggregation; - EnableRegionalMdmAccount = enableRegionalMdmAccount; - SourceMdmAccount = sourceMdmAccount; - SourceMdmNamespace = sourceMdmNamespace; - MetricFilterPattern = metricFilterPattern; - FillGapWithZero = fillGapWithZero; - IsInternal = isInternal; - Dimensions = dimensions; - Category = category; - Availabilities = availabilities; - SupportedTimeGrainTypes = supportedTimeGrainTypes; - SupportedAggregationTypes = supportedAggregationTypes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "displayDescription")] - public string DisplayDescription { get; set; } - - /// - /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } - - /// - /// - [JsonProperty(PropertyName = "aggregationType")] - public string AggregationType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "supportsInstanceLevelAggregation")] - public bool? SupportsInstanceLevelAggregation { get; set; } - - /// - /// - [JsonProperty(PropertyName = "enableRegionalMdmAccount")] - public bool? EnableRegionalMdmAccount { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sourceMdmAccount")] - public string SourceMdmAccount { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sourceMdmNamespace")] - public string SourceMdmNamespace { get; set; } - - /// - /// - [JsonProperty(PropertyName = "metricFilterPattern")] - public string MetricFilterPattern { get; set; } - - /// - /// - [JsonProperty(PropertyName = "fillGapWithZero")] - public bool? FillGapWithZero { get; set; } - - /// - /// - [JsonProperty(PropertyName = "isInternal")] - public bool? IsInternal { get; set; } - - /// - /// - [JsonProperty(PropertyName = "dimensions")] - public IList Dimensions { get; set; } - - /// - /// - [JsonProperty(PropertyName = "category")] - public string Category { get; set; } - - /// - /// - [JsonProperty(PropertyName = "availabilities")] - public IList Availabilities { get; set; } - - /// - /// - [JsonProperty(PropertyName = "supportedTimeGrainTypes")] - public IList SupportedTimeGrainTypes { get; set; } - - /// - /// - [JsonProperty(PropertyName = "supportedAggregationTypes")] - public IList SupportedAggregationTypes { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlRequest.cs deleted file mode 100644 index db3069fe54b2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlRequest.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// MySQL migration request. - /// - [Rest.Serialization.JsonTransformation] - public partial class MigrateMySqlRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the MigrateMySqlRequest class. - /// - public MigrateMySqlRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MigrateMySqlRequest class. - /// - /// Connection string to the remote - /// MySQL database. - /// The type of migration operation to be - /// done. Possible values include: 'LocalToRemote', - /// 'RemoteToLocal' - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public MigrateMySqlRequest(string connectionString, MySqlMigrationType migrationType, string id = default(string), string name = default(string), string kind = default(string), string type = default(string)) - : base(id, name, kind, type) - { - ConnectionString = connectionString; - MigrationType = migrationType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets connection string to the remote MySQL database. - /// - [JsonProperty(PropertyName = "properties.connectionString")] - public string ConnectionString { get; set; } - - /// - /// Gets or sets the type of migration operation to be done. Possible - /// values include: 'LocalToRemote', 'RemoteToLocal' - /// - [JsonProperty(PropertyName = "properties.migrationType")] - public MySqlMigrationType MigrationType { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ConnectionString == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "ConnectionString"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlStatus.cs deleted file mode 100644 index 459d50aef84b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MigrateMySqlStatus.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// MySQL migration status. - /// - [Rest.Serialization.JsonTransformation] - public partial class MigrateMySqlStatus : ProxyOnlyResource - { - /// - /// Initializes a new instance of the MigrateMySqlStatus class. - /// - public MigrateMySqlStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the MigrateMySqlStatus class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Status of the migration - /// task. Possible values include: 'InProgress', 'Failed', 'Succeeded', - /// 'TimedOut', 'Created' - /// Operation ID for the migration - /// task. - /// True if the web app has in app - /// MySql enabled - public MigrateMySqlStatus(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), OperationStatus? migrationOperationStatus = default(OperationStatus?), string operationId = default(string), bool? localMySqlEnabled = default(bool?)) - : base(id, name, kind, type) - { - MigrationOperationStatus = migrationOperationStatus; - OperationId = operationId; - LocalMySqlEnabled = localMySqlEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets status of the migration task. Possible values include: - /// 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' - /// - [JsonProperty(PropertyName = "properties.migrationOperationStatus")] - public OperationStatus? MigrationOperationStatus { get; private set; } - - /// - /// Gets operation ID for the migration task. - /// - [JsonProperty(PropertyName = "properties.operationId")] - public string OperationId { get; private set; } - - /// - /// Gets true if the web app has in app MySql enabled - /// - [JsonProperty(PropertyName = "properties.localMySqlEnabled")] - public bool? LocalMySqlEnabled { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MySqlMigrationType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MySqlMigrationType.cs deleted file mode 100644 index 72b86f7ca14d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/MySqlMigrationType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for MySqlMigrationType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum MySqlMigrationType - { - [EnumMember(Value = "LocalToRemote")] - LocalToRemote, - [EnumMember(Value = "RemoteToLocal")] - RemoteToLocal - } - internal static class MySqlMigrationTypeEnumExtension - { - internal static string ToSerializedValue(this MySqlMigrationType? value) - { - return value == null ? null : ((MySqlMigrationType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this MySqlMigrationType value) - { - switch( value ) - { - case MySqlMigrationType.LocalToRemote: - return "LocalToRemote"; - case MySqlMigrationType.RemoteToLocal: - return "RemoteToLocal"; - } - return null; - } - - internal static MySqlMigrationType? ParseMySqlMigrationType(this string value) - { - switch( value ) - { - case "LocalToRemote": - return MySqlMigrationType.LocalToRemote; - case "RemoteToLocal": - return MySqlMigrationType.RemoteToLocal; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameIdentifier.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameIdentifier.cs deleted file mode 100644 index 71bcdbc98296..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameIdentifier.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Identifies an object. - /// - public partial class NameIdentifier - { - /// - /// Initializes a new instance of the NameIdentifier class. - /// - public NameIdentifier() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NameIdentifier class. - /// - /// Name of the object. - public NameIdentifier(string name = default(string)) - { - Name = name; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the object. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameValuePair.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameValuePair.cs deleted file mode 100644 index 81a8ac40a028..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NameValuePair.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Name value pair. - /// - public partial class NameValuePair - { - /// - /// Initializes a new instance of the NameValuePair class. - /// - public NameValuePair() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NameValuePair class. - /// - /// Pair name. - /// Pair value. - public NameValuePair(string name = default(string), string value = default(string)) - { - Name = name; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets pair name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets pair value. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkFeatures.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkFeatures.cs deleted file mode 100644 index af9cf1928dac..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkFeatures.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Full view of network features for an app (presently VNET integration - /// and Hybrid Connections). - /// - [Rest.Serialization.JsonTransformation] - public partial class NetworkFeatures : ProxyOnlyResource - { - /// - /// Initializes a new instance of the NetworkFeatures class. - /// - public NetworkFeatures() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NetworkFeatures class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The Virtual Network name. - /// The Virtual Network summary - /// view. - /// The Hybrid Connections summary - /// view. - /// The Hybrid Connection V2 (Service - /// Bus) view. - public NetworkFeatures(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string virtualNetworkName = default(string), VnetInfo virtualNetworkConnection = default(VnetInfo), IList hybridConnections = default(IList), IList hybridConnectionsV2 = default(IList)) - : base(id, name, kind, type) - { - VirtualNetworkName = virtualNetworkName; - VirtualNetworkConnection = virtualNetworkConnection; - HybridConnections = hybridConnections; - HybridConnectionsV2 = hybridConnectionsV2; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the Virtual Network name. - /// - [JsonProperty(PropertyName = "properties.virtualNetworkName")] - public string VirtualNetworkName { get; private set; } - - /// - /// Gets the Virtual Network summary view. - /// - [JsonProperty(PropertyName = "properties.virtualNetworkConnection")] - public VnetInfo VirtualNetworkConnection { get; private set; } - - /// - /// Gets the Hybrid Connections summary view. - /// - [JsonProperty(PropertyName = "properties.hybridConnections")] - public IList HybridConnections { get; private set; } - - /// - /// Gets the Hybrid Connection V2 (Service Bus) view. - /// - [JsonProperty(PropertyName = "properties.hybridConnectionsV2")] - public IList HybridConnectionsV2 { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkTrace.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkTrace.cs deleted file mode 100644 index dd2aad70cd18..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NetworkTrace.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Network trace - /// - public partial class NetworkTrace - { - /// - /// Initializes a new instance of the NetworkTrace class. - /// - public NetworkTrace() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the NetworkTrace class. - /// - /// Local file path for the captured network trace - /// file. - /// Current status of the network trace operation, - /// same as Operation.Status (InProgress/Succeeded/Failed). - /// Detailed message of a network trace - /// operation, e.g. error message in case of failure. - public NetworkTrace(string path = default(string), string status = default(string), string message = default(string)) - { - Path = path; - Status = status; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets local file path for the captured network trace file. - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - /// - /// Gets or sets current status of the network trace operation, same as - /// Operation.Status (InProgress/Succeeded/Failed). - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - /// - /// Gets or sets detailed message of a network trace operation, e.g. - /// error message in case of failure. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs deleted file mode 100644 index 454998315915..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Nonce.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the nonce used in the login flow. - /// - public partial class Nonce - { - /// - /// Initializes a new instance of the Nonce class. - /// - public Nonce() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Nonce class. - /// - /// <code>false</code> if the - /// nonce should not be validated while completing the login flow; - /// otherwise, <code>true</code>. - /// The time after the request is - /// made when the nonce should expire. - public Nonce(bool? validateNonce = default(bool?), string nonceExpirationInterval = default(string)) - { - ValidateNonce = validateNonce; - NonceExpirationInterval = nonceExpirationInterval; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// nonce should not be validated while completing the login flow; - /// otherwise, &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "validateNonce")] - public bool? ValidateNonce { get; set; } - - /// - /// Gets or sets the time after the request is made when the nonce - /// should expire. - /// - [JsonProperty(PropertyName = "nonceExpirationInterval")] - public string NonceExpirationInterval { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NotificationLevel.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NotificationLevel.cs deleted file mode 100644 index 467c91909fdd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/NotificationLevel.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for NotificationLevel. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum NotificationLevel - { - [EnumMember(Value = "Critical")] - Critical, - [EnumMember(Value = "Warning")] - Warning, - [EnumMember(Value = "Information")] - Information, - [EnumMember(Value = "NonUrgentSuggestion")] - NonUrgentSuggestion - } - internal static class NotificationLevelEnumExtension - { - internal static string ToSerializedValue(this NotificationLevel? value) - { - return value == null ? null : ((NotificationLevel)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this NotificationLevel value) - { - switch( value ) - { - case NotificationLevel.Critical: - return "Critical"; - case NotificationLevel.Warning: - return "Warning"; - case NotificationLevel.Information: - return "Information"; - case NotificationLevel.NonUrgentSuggestion: - return "NonUrgentSuggestion"; - } - return null; - } - - internal static NotificationLevel? ParseNotificationLevel(this string value) - { - switch( value ) - { - case "Critical": - return NotificationLevel.Critical; - case "Warning": - return NotificationLevel.Warning; - case "Information": - return NotificationLevel.Information; - case "NonUrgentSuggestion": - return NotificationLevel.NonUrgentSuggestion; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs deleted file mode 100644 index 0520f3fcd5ef..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectClientCredential.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The authentication client credentials of the custom Open ID Connect - /// provider. - /// - public partial class OpenIdConnectClientCredential - { - /// - /// Initializes a new instance of the OpenIdConnectClientCredential - /// class. - /// - public OpenIdConnectClientCredential() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenIdConnectClientCredential - /// class. - /// - /// The method that should be used to authenticate - /// the user. Possible values include: 'ClientSecretPost' - /// The app setting that contains - /// the client secret for the custom Open ID Connect provider. - public OpenIdConnectClientCredential(ClientCredentialMethod? method = default(ClientCredentialMethod?), string clientSecretSettingName = default(string)) - { - Method = method; - ClientSecretSettingName = clientSecretSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the method that should be used to authenticate the - /// user. Possible values include: 'ClientSecretPost' - /// - [JsonProperty(PropertyName = "method")] - public ClientCredentialMethod? Method { get; set; } - - /// - /// Gets or sets the app setting that contains the client secret for - /// the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "clientSecretSettingName")] - public string ClientSecretSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs deleted file mode 100644 index b3a82561a366..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectConfig.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the endpoints used for the custom Open ID - /// Connect provider. - /// - public partial class OpenIdConnectConfig - { - /// - /// Initializes a new instance of the OpenIdConnectConfig class. - /// - public OpenIdConnectConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenIdConnectConfig class. - /// - /// The endpoint to be used to make - /// an authorization request. - /// The endpoint to be used to request a - /// token. - /// The endpoint that issues the token. - /// The endpoint that provides the keys - /// necessary to validate the token. - /// The endpoint that - /// contains all the configuration endpoints for the provider. - public OpenIdConnectConfig(string authorizationEndpoint = default(string), string tokenEndpoint = default(string), string issuer = default(string), string certificationUri = default(string), string wellKnownOpenIdConfiguration = default(string)) - { - AuthorizationEndpoint = authorizationEndpoint; - TokenEndpoint = tokenEndpoint; - Issuer = issuer; - CertificationUri = certificationUri; - WellKnownOpenIdConfiguration = wellKnownOpenIdConfiguration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the endpoint to be used to make an authorization - /// request. - /// - [JsonProperty(PropertyName = "authorizationEndpoint")] - public string AuthorizationEndpoint { get; set; } - - /// - /// Gets or sets the endpoint to be used to request a token. - /// - [JsonProperty(PropertyName = "tokenEndpoint")] - public string TokenEndpoint { get; set; } - - /// - /// Gets or sets the endpoint that issues the token. - /// - [JsonProperty(PropertyName = "issuer")] - public string Issuer { get; set; } - - /// - /// Gets or sets the endpoint that provides the keys necessary to - /// validate the token. - /// - [JsonProperty(PropertyName = "certificationUri")] - public string CertificationUri { get; set; } - - /// - /// Gets or sets the endpoint that contains all the configuration - /// endpoints for the provider. - /// - [JsonProperty(PropertyName = "wellKnownOpenIdConfiguration")] - public string WellKnownOpenIdConfiguration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs deleted file mode 100644 index c796661c1cde..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectLogin.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The configuration settings of the login flow of the custom Open ID - /// Connect provider. - /// - public partial class OpenIdConnectLogin - { - /// - /// Initializes a new instance of the OpenIdConnectLogin class. - /// - public OpenIdConnectLogin() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenIdConnectLogin class. - /// - /// The name of the claim that contains the - /// users name. - /// A list of the scopes that should be requested - /// while authenticating. - public OpenIdConnectLogin(string nameClaimType = default(string), IList scopes = default(IList)) - { - NameClaimType = nameClaimType; - Scopes = scopes; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the claim that contains the users name. - /// - [JsonProperty(PropertyName = "nameClaimType")] - public string NameClaimType { get; set; } - - /// - /// Gets or sets a list of the scopes that should be requested while - /// authenticating. - /// - [JsonProperty(PropertyName = "scopes")] - public IList Scopes { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs deleted file mode 100644 index aa3caa98ff4e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OpenIdConnectRegistration.cs +++ /dev/null @@ -1,74 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the app registration for the custom Open - /// ID Connect provider. - /// - public partial class OpenIdConnectRegistration - { - /// - /// Initializes a new instance of the OpenIdConnectRegistration class. - /// - public OpenIdConnectRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OpenIdConnectRegistration class. - /// - /// The client id of the custom Open ID Connect - /// provider. - /// The authentication credentials of - /// the custom Open ID Connect provider. - /// The configuration settings - /// of the endpoints used for the custom Open ID Connect - /// provider. - public OpenIdConnectRegistration(string clientId = default(string), OpenIdConnectClientCredential clientCredential = default(OpenIdConnectClientCredential), OpenIdConnectConfig openIdConnectConfiguration = default(OpenIdConnectConfig)) - { - ClientId = clientId; - ClientCredential = clientCredential; - OpenIdConnectConfiguration = openIdConnectConfiguration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the client id of the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the authentication credentials of the custom Open ID - /// Connect provider. - /// - [JsonProperty(PropertyName = "clientCredential")] - public OpenIdConnectClientCredential ClientCredential { get; set; } - - /// - /// Gets or sets the configuration settings of the endpoints used for - /// the custom Open ID Connect provider. - /// - [JsonProperty(PropertyName = "openIdConnectConfiguration")] - public OpenIdConnectConfig OpenIdConnectConfiguration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Operation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Operation.cs deleted file mode 100644 index 3bc7056b44e8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Operation.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// An operation on a resource. - /// - public partial class Operation - { - /// - /// Initializes a new instance of the Operation class. - /// - public Operation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Operation class. - /// - /// Operation ID. - /// Operation name. - /// The current status of the operation. Possible - /// values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', - /// 'Created' - /// Any errors associate with the - /// operation. - /// Time when operation has started. - /// Time when operation has been - /// updated. - /// Time when operation will - /// expire. - /// Applicable only for stamp - /// operation ids. - public Operation(string id = default(string), string name = default(string), OperationStatus? status = default(OperationStatus?), IList errors = default(IList), System.DateTime? createdTime = default(System.DateTime?), System.DateTime? modifiedTime = default(System.DateTime?), System.DateTime? expirationTime = default(System.DateTime?), System.Guid? geoMasterOperationId = default(System.Guid?)) - { - Id = id; - Name = name; - Status = status; - Errors = errors; - CreatedTime = createdTime; - ModifiedTime = modifiedTime; - ExpirationTime = expirationTime; - GeoMasterOperationId = geoMasterOperationId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets operation ID. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets or sets operation name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the current status of the operation. Possible values - /// include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' - /// - [JsonProperty(PropertyName = "status")] - public OperationStatus? Status { get; set; } - - /// - /// Gets or sets any errors associate with the operation. - /// - [JsonProperty(PropertyName = "errors")] - public IList Errors { get; set; } - - /// - /// Gets or sets time when operation has started. - /// - [JsonProperty(PropertyName = "createdTime")] - public System.DateTime? CreatedTime { get; set; } - - /// - /// Gets or sets time when operation has been updated. - /// - [JsonProperty(PropertyName = "modifiedTime")] - public System.DateTime? ModifiedTime { get; set; } - - /// - /// Gets or sets time when operation will expire. - /// - [JsonProperty(PropertyName = "expirationTime")] - public System.DateTime? ExpirationTime { get; set; } - - /// - /// Gets or sets applicable only for stamp operation ids. - /// - [JsonProperty(PropertyName = "geoMasterOperationId")] - public System.Guid? GeoMasterOperationId { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OperationStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OperationStatus.cs deleted file mode 100644 index 2c2fdb31a3d3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OperationStatus.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for OperationStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum OperationStatus - { - [EnumMember(Value = "InProgress")] - InProgress, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Succeeded")] - Succeeded, - [EnumMember(Value = "TimedOut")] - TimedOut, - [EnumMember(Value = "Created")] - Created - } - internal static class OperationStatusEnumExtension - { - internal static string ToSerializedValue(this OperationStatus? value) - { - return value == null ? null : ((OperationStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this OperationStatus value) - { - switch( value ) - { - case OperationStatus.InProgress: - return "InProgress"; - case OperationStatus.Failed: - return "Failed"; - case OperationStatus.Succeeded: - return "Succeeded"; - case OperationStatus.TimedOut: - return "TimedOut"; - case OperationStatus.Created: - return "Created"; - } - return null; - } - - internal static OperationStatus? ParseOperationStatus(this string value) - { - switch( value ) - { - case "InProgress": - return OperationStatus.InProgress; - case "Failed": - return OperationStatus.Failed; - case "Succeeded": - return OperationStatus.Succeeded; - case "TimedOut": - return OperationStatus.TimedOut; - case "Created": - return OperationStatus.Created; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OutboundEnvironmentEndpoint.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OutboundEnvironmentEndpoint.cs deleted file mode 100644 index c7de2355e83d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/OutboundEnvironmentEndpoint.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Endpoints accessed for a common purpose that the App Service - /// Environment requires outbound network access to. - /// - public partial class OutboundEnvironmentEndpoint - { - /// - /// Initializes a new instance of the OutboundEnvironmentEndpoint - /// class. - /// - public OutboundEnvironmentEndpoint() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the OutboundEnvironmentEndpoint - /// class. - /// - /// The type of service accessed by the App - /// Service Environment, e.g., Azure Storage, Azure SQL Database, and - /// Azure Active Directory. - /// The endpoints that the App Service - /// Environment reaches the service at. - public OutboundEnvironmentEndpoint(string category = default(string), IList endpoints = default(IList)) - { - Category = category; - Endpoints = endpoints; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the type of service accessed by the App Service - /// Environment, e.g., Azure Storage, Azure SQL Database, and Azure - /// Active Directory. - /// - [JsonProperty(PropertyName = "category")] - public string Category { get; set; } - - /// - /// Gets or sets the endpoints that the App Service Environment reaches - /// the service at. - /// - [JsonProperty(PropertyName = "endpoints")] - public IList Endpoints { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Page.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Page.cs deleted file mode 100644 index 259e454257a7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Page.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - - /// - /// Defines a page in Azure responses. - /// - /// Type of the page content items - [JsonObject] - public class Page : IPage - { - /// - /// Gets the link to the next page. - /// - [JsonProperty("nextLink")] - public string NextPageLink { get; private set; } - - [JsonProperty("value")] - private IList Items{ get; set; } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - public IEnumerator GetEnumerator() - { - return Items == null ? System.Linq.Enumerable.Empty().GetEnumerator() : Items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through the collection. - /// - /// A an enumerator that can be used to iterate through the collection. - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonResponse.cs deleted file mode 100644 index 835f102738e4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonResponse.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Performance monitor API response. - /// - public partial class PerfMonResponse - { - /// - /// Initializes a new instance of the PerfMonResponse class. - /// - public PerfMonResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PerfMonResponse class. - /// - /// The response code. - /// The message. - /// The performance monitor counters. - public PerfMonResponse(string code = default(string), string message = default(string), PerfMonSet data = default(PerfMonSet)) - { - Code = code; - Message = message; - Data = data; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the response code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets or sets the message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// Gets or sets the performance monitor counters. - /// - [JsonProperty(PropertyName = "data")] - public PerfMonSet Data { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSample.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSample.cs deleted file mode 100644 index 7680bce28534..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSample.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Performance monitor sample in a set. - /// - public partial class PerfMonSample - { - /// - /// Initializes a new instance of the PerfMonSample class. - /// - public PerfMonSample() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PerfMonSample class. - /// - /// Point in time for which counter was - /// measured. - /// Name of the server on which the - /// measurement is made. - /// Value of counter at a certain time. - public PerfMonSample(System.DateTime? time = default(System.DateTime?), string instanceName = default(string), double? value = default(double?)) - { - Time = time; - InstanceName = instanceName; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets point in time for which counter was measured. - /// - [JsonProperty(PropertyName = "time")] - public System.DateTime? Time { get; set; } - - /// - /// Gets or sets name of the server on which the measurement is made. - /// - [JsonProperty(PropertyName = "instanceName")] - public string InstanceName { get; set; } - - /// - /// Gets or sets value of counter at a certain time. - /// - [JsonProperty(PropertyName = "value")] - public double? Value { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSet.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSet.cs deleted file mode 100644 index 3b7842c98441..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PerfMonSet.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Metric information. - /// - public partial class PerfMonSet - { - /// - /// Initializes a new instance of the PerfMonSet class. - /// - public PerfMonSet() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PerfMonSet class. - /// - /// Unique key name of the counter. - /// Start time of the period. - /// End time of the period. - /// Presented time grain. - /// Collection of workers that are active during - /// this time. - public PerfMonSet(string name = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string timeGrain = default(string), IList values = default(IList)) - { - Name = name; - StartTime = startTime; - EndTime = endTime; - TimeGrain = timeGrain; - Values = values; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique key name of the counter. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets start time of the period. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time of the period. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets presented time grain. - /// - [JsonProperty(PropertyName = "timeGrain")] - public string TimeGrain { get; set; } - - /// - /// Gets or sets collection of workers that are active during this - /// time. - /// - [JsonProperty(PropertyName = "values")] - public IList Values { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOn.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOn.cs deleted file mode 100644 index 680ea63fa64b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOn.cs +++ /dev/null @@ -1,107 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Premier add-on. - /// - [Rest.Serialization.JsonTransformation] - public partial class PremierAddOn : Resource - { - /// - /// Initializes a new instance of the PremierAddOn class. - /// - public PremierAddOn() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PremierAddOn class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Premier add on SKU. - /// Premier add on Product. - /// Premier add on Vendor. - /// Premier add on Marketplace - /// publisher. - /// Premier add on Marketplace - /// offer. - public PremierAddOn(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string sku = default(string), string product = default(string), string vendor = default(string), string marketplacePublisher = default(string), string marketplaceOffer = default(string)) - : base(location, id, name, kind, type, tags) - { - Sku = sku; - Product = product; - Vendor = vendor; - MarketplacePublisher = marketplacePublisher; - MarketplaceOffer = marketplaceOffer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets premier add on SKU. - /// - [JsonProperty(PropertyName = "properties.sku")] - public string Sku { get; set; } - - /// - /// Gets or sets premier add on Product. - /// - [JsonProperty(PropertyName = "properties.product")] - public string Product { get; set; } - - /// - /// Gets or sets premier add on Vendor. - /// - [JsonProperty(PropertyName = "properties.vendor")] - public string Vendor { get; set; } - - /// - /// Gets or sets premier add on Marketplace publisher. - /// - [JsonProperty(PropertyName = "properties.marketplacePublisher")] - public string MarketplacePublisher { get; set; } - - /// - /// Gets or sets premier add on Marketplace offer. - /// - [JsonProperty(PropertyName = "properties.marketplaceOffer")] - public string MarketplaceOffer { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnOffer.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnOffer.cs deleted file mode 100644 index a81239aad5ef..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnOffer.cs +++ /dev/null @@ -1,139 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Premier add-on offer. - /// - [Rest.Serialization.JsonTransformation] - public partial class PremierAddOnOffer : ProxyOnlyResource - { - /// - /// Initializes a new instance of the PremierAddOnOffer class. - /// - public PremierAddOnOffer() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PremierAddOnOffer class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Premier add on SKU. - /// Premier add on offer Product. - /// Premier add on offer Vendor. - /// <code>true</code> if - /// promotion code is required; otherwise, - /// <code>false</code>. - /// Premier add on offer Quota. - /// App Service plans this - /// offer is restricted to. Possible values include: 'None', 'Free', - /// 'Shared', 'Basic', 'Standard', 'Premium' - /// Privacy policy URL. - /// Legal terms URL. - /// Marketplace publisher. - /// Marketplace offer. - public PremierAddOnOffer(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string sku = default(string), string product = default(string), string vendor = default(string), bool? promoCodeRequired = default(bool?), int? quota = default(int?), AppServicePlanRestrictions? webHostingPlanRestrictions = default(AppServicePlanRestrictions?), string privacyPolicyUrl = default(string), string legalTermsUrl = default(string), string marketplacePublisher = default(string), string marketplaceOffer = default(string)) - : base(id, name, kind, type) - { - Sku = sku; - Product = product; - Vendor = vendor; - PromoCodeRequired = promoCodeRequired; - Quota = quota; - WebHostingPlanRestrictions = webHostingPlanRestrictions; - PrivacyPolicyUrl = privacyPolicyUrl; - LegalTermsUrl = legalTermsUrl; - MarketplacePublisher = marketplacePublisher; - MarketplaceOffer = marketplaceOffer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets premier add on SKU. - /// - [JsonProperty(PropertyName = "properties.sku")] - public string Sku { get; set; } - - /// - /// Gets or sets premier add on offer Product. - /// - [JsonProperty(PropertyName = "properties.product")] - public string Product { get; set; } - - /// - /// Gets or sets premier add on offer Vendor. - /// - [JsonProperty(PropertyName = "properties.vendor")] - public string Vendor { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// promotion code is required; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.promoCodeRequired")] - public bool? PromoCodeRequired { get; set; } - - /// - /// Gets or sets premier add on offer Quota. - /// - [JsonProperty(PropertyName = "properties.quota")] - public int? Quota { get; set; } - - /// - /// Gets or sets app Service plans this offer is restricted to. - /// Possible values include: 'None', 'Free', 'Shared', 'Basic', - /// 'Standard', 'Premium' - /// - [JsonProperty(PropertyName = "properties.webHostingPlanRestrictions")] - public AppServicePlanRestrictions? WebHostingPlanRestrictions { get; set; } - - /// - /// Gets or sets privacy policy URL. - /// - [JsonProperty(PropertyName = "properties.privacyPolicyUrl")] - public string PrivacyPolicyUrl { get; set; } - - /// - /// Gets or sets legal terms URL. - /// - [JsonProperty(PropertyName = "properties.legalTermsUrl")] - public string LegalTermsUrl { get; set; } - - /// - /// Gets or sets marketplace publisher. - /// - [JsonProperty(PropertyName = "properties.marketplacePublisher")] - public string MarketplacePublisher { get; set; } - - /// - /// Gets or sets marketplace offer. - /// - [JsonProperty(PropertyName = "properties.marketplaceOffer")] - public string MarketplaceOffer { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnPatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnPatchResource.cs deleted file mode 100644 index db9df88b7a70..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PremierAddOnPatchResource.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// ARM resource for a PremierAddOn. - /// - [Rest.Serialization.JsonTransformation] - public partial class PremierAddOnPatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the PremierAddOnPatchResource class. - /// - public PremierAddOnPatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PremierAddOnPatchResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Premier add on SKU. - /// Premier add on Product. - /// Premier add on Vendor. - /// Premier add on Marketplace - /// publisher. - /// Premier add on Marketplace - /// offer. - public PremierAddOnPatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string sku = default(string), string product = default(string), string vendor = default(string), string marketplacePublisher = default(string), string marketplaceOffer = default(string)) - : base(id, name, kind, type) - { - Sku = sku; - Product = product; - Vendor = vendor; - MarketplacePublisher = marketplacePublisher; - MarketplaceOffer = marketplaceOffer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets premier add on SKU. - /// - [JsonProperty(PropertyName = "properties.sku")] - public string Sku { get; set; } - - /// - /// Gets or sets premier add on Product. - /// - [JsonProperty(PropertyName = "properties.product")] - public string Product { get; set; } - - /// - /// Gets or sets premier add on Vendor. - /// - [JsonProperty(PropertyName = "properties.vendor")] - public string Vendor { get; set; } - - /// - /// Gets or sets premier add on Marketplace publisher. - /// - [JsonProperty(PropertyName = "properties.marketplacePublisher")] - public string MarketplacePublisher { get; set; } - - /// - /// Gets or sets premier add on Marketplace offer. - /// - [JsonProperty(PropertyName = "properties.marketplaceOffer")] - public string MarketplaceOffer { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccess.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccess.cs deleted file mode 100644 index 776a949db130..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccess.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of the parameters of Private Access for a Web Site. - /// - [Rest.Serialization.JsonTransformation] - public partial class PrivateAccess : ProxyOnlyResource - { - /// - /// Initializes a new instance of the PrivateAccess class. - /// - public PrivateAccess() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateAccess class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Whether private access is enabled or - /// not. - /// The Virtual Networks (and subnets) - /// allowed to access the site privately. - public PrivateAccess(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), IList virtualNetworks = default(IList)) - : base(id, name, kind, type) - { - Enabled = enabled; - VirtualNetworks = virtualNetworks; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets whether private access is enabled or not. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the Virtual Networks (and subnets) allowed to access - /// the site privately. - /// - [JsonProperty(PropertyName = "properties.virtualNetworks")] - public IList VirtualNetworks { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessSubnet.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessSubnet.cs deleted file mode 100644 index ba29e37944d8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessSubnet.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description of a Virtual Network subnet that is useable for private - /// site access. - /// - public partial class PrivateAccessSubnet - { - /// - /// Initializes a new instance of the PrivateAccessSubnet class. - /// - public PrivateAccessSubnet() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateAccessSubnet class. - /// - /// The name of the subnet. - /// The key (ID) of the subnet. - public PrivateAccessSubnet(string name = default(string), int? key = default(int?)) - { - Name = name; - Key = key; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the subnet. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the key (ID) of the subnet. - /// - [JsonProperty(PropertyName = "key")] - public int? Key { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessVirtualNetwork.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessVirtualNetwork.cs deleted file mode 100644 index 56c4af4f74f7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateAccessVirtualNetwork.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of a Virtual Network that is useable for private site - /// access. - /// - public partial class PrivateAccessVirtualNetwork - { - /// - /// Initializes a new instance of the PrivateAccessVirtualNetwork - /// class. - /// - public PrivateAccessVirtualNetwork() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateAccessVirtualNetwork - /// class. - /// - /// The name of the Virtual Network. - /// The key (ID) of the Virtual Network. - /// The ARM uri of the Virtual Network - /// A List of subnets that access is allowed to - /// on this Virtual Network. An empty array (but not null) is - /// interpreted to mean that all subnets are allowed within this - /// Virtual Network. - public PrivateAccessVirtualNetwork(string name = default(string), int? key = default(int?), string resourceId = default(string), IList subnets = default(IList)) - { - Name = name; - Key = key; - ResourceId = resourceId; - Subnets = subnets; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the Virtual Network. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets the key (ID) of the Virtual Network. - /// - [JsonProperty(PropertyName = "key")] - public int? Key { get; set; } - - /// - /// Gets or sets the ARM uri of the Virtual Network - /// - [JsonProperty(PropertyName = "resourceId")] - public string ResourceId { get; set; } - - /// - /// Gets or sets a List of subnets that access is allowed to on this - /// Virtual Network. An empty array (but not null) is interpreted to - /// mean that all subnets are allowed within this Virtual Network. - /// - [JsonProperty(PropertyName = "subnets")] - public IList Subnets { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs deleted file mode 100644 index ef3b3bd9df49..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionApprovalRequestResource.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Private Endpoint Connection Approval ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class PrivateLinkConnectionApprovalRequestResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// PrivateLinkConnectionApprovalRequestResource class. - /// - public PrivateLinkConnectionApprovalRequestResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// PrivateLinkConnectionApprovalRequestResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public PrivateLinkConnectionApprovalRequestResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState)) - : base(id, name, kind, type) - { - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] - public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionState.cs deleted file mode 100644 index 3b63407e7c0e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkConnectionState.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The state of a private link connection - /// - public partial class PrivateLinkConnectionState - { - /// - /// Initializes a new instance of the PrivateLinkConnectionState class. - /// - public PrivateLinkConnectionState() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateLinkConnectionState class. - /// - /// Status of a private link connection - /// Description of a private link - /// connection - /// ActionsRequired for a private link - /// connection - public PrivateLinkConnectionState(string status = default(string), string description = default(string), string actionsRequired = default(string)) - { - Status = status; - Description = description; - ActionsRequired = actionsRequired; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets status of a private link connection - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - /// - /// Gets or sets description of a private link connection - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets actionsRequired for a private link connection - /// - [JsonProperty(PropertyName = "actionsRequired")] - public string ActionsRequired { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResource.cs deleted file mode 100644 index 16b30cfebcc3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResource.cs +++ /dev/null @@ -1,98 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A private link resource - /// - public partial class PrivateLinkResource - { - /// - /// Initializes a new instance of the PrivateLinkResource class. - /// - public PrivateLinkResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateLinkResource class. - /// - /// Name of a private link resource - /// Properties of a private link - /// resource - public PrivateLinkResource(string id, string name, string type, PrivateLinkResourceProperties properties) - { - Id = id; - Name = name; - Type = type; - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets or sets name of a private link resource - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets properties of a private link resource - /// - [JsonProperty(PropertyName = "properties")] - public PrivateLinkResourceProperties Properties { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Id"); - } - if (Name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Name"); - } - if (Type == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Type"); - } - if (Properties == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Properties"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourceProperties.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourceProperties.cs deleted file mode 100644 index e421a58138e6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourceProperties.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Properties of a private link resource - /// - public partial class PrivateLinkResourceProperties - { - /// - /// Initializes a new instance of the PrivateLinkResourceProperties - /// class. - /// - public PrivateLinkResourceProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateLinkResourceProperties - /// class. - /// - /// GroupId of a private link resource - /// RequiredMembers of a private link - /// resource - /// RequiredZoneNames of a private link - /// resource - public PrivateLinkResourceProperties(string groupId = default(string), IList requiredMembers = default(IList), IList requiredZoneNames = default(IList)) - { - GroupId = groupId; - RequiredMembers = requiredMembers; - RequiredZoneNames = requiredZoneNames; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets groupId of a private link resource - /// - [JsonProperty(PropertyName = "groupId")] - public string GroupId { get; private set; } - - /// - /// Gets requiredMembers of a private link resource - /// - [JsonProperty(PropertyName = "requiredMembers")] - public IList RequiredMembers { get; private set; } - - /// - /// Gets requiredZoneNames of a private link resource - /// - [JsonProperty(PropertyName = "requiredZoneNames")] - public IList RequiredZoneNames { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourcesWrapper.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourcesWrapper.cs deleted file mode 100644 index 0aed6d8e9f87..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PrivateLinkResourcesWrapper.cs +++ /dev/null @@ -1,77 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Wrapper for a collection of private link resources - /// - public partial class PrivateLinkResourcesWrapper - { - /// - /// Initializes a new instance of the PrivateLinkResourcesWrapper - /// class. - /// - public PrivateLinkResourcesWrapper() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PrivateLinkResourcesWrapper - /// class. - /// - public PrivateLinkResourcesWrapper(IList value) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Value == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Value"); - } - if (Value != null) - { - foreach (var element in Value) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessInfo.cs deleted file mode 100644 index a8bf754df141..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessInfo.cs +++ /dev/null @@ -1,344 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Process Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class ProcessInfo : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ProcessInfo class. - /// - public ProcessInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProcessInfo class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// ARM Identifier for deployment. - /// Deployment name. - /// HRef URI. - /// Minidump URI. - /// Is profile running? - /// Is the IIS Profile - /// running? - /// IIS Profile timeout - /// (seconds). - /// Parent process. - /// Child process list. - /// Thread list. - /// List of open files. - /// List of modules. - /// File name of this process. - /// Command line. - /// User name. - /// Handle count. - /// Module count. - /// Thread count. - /// Start time. - /// Total CPU time. - /// User CPU time. - /// Privileged CPU time. - /// Working set. - /// Peak working set. - /// Private memory size. - /// Virtual memory size. - /// Peak virtual memory usage. - /// Paged system memory. - /// Non-paged system memory. - /// Paged memory. - /// Peak paged memory. - /// Time stamp. - /// List of environment - /// variables. - /// Is this the SCM site? - /// Is this a Web Job? - /// Description of process. - public ProcessInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? identifier = default(int?), string deploymentName = default(string), string href = default(string), string minidump = default(string), bool? isProfileRunning = default(bool?), bool? isIisProfileRunning = default(bool?), double? iisProfileTimeoutInSeconds = default(double?), string parent = default(string), IList children = default(IList), IList threads = default(IList), IList openFileHandles = default(IList), IList modules = default(IList), string fileName = default(string), string commandLine = default(string), string userName = default(string), int? handleCount = default(int?), int? moduleCount = default(int?), int? threadCount = default(int?), System.DateTime? startTime = default(System.DateTime?), string totalCpuTime = default(string), string userCpuTime = default(string), string privilegedCpuTime = default(string), long? workingSet = default(long?), long? peakWorkingSet = default(long?), long? privateMemory = default(long?), long? virtualMemory = default(long?), long? peakVirtualMemory = default(long?), long? pagedSystemMemory = default(long?), long? nonPagedSystemMemory = default(long?), long? pagedMemory = default(long?), long? peakPagedMemory = default(long?), System.DateTime? timeStamp = default(System.DateTime?), IDictionary environmentVariables = default(IDictionary), bool? isScmSite = default(bool?), bool? isWebjob = default(bool?), string description = default(string)) - : base(id, name, kind, type) - { - Identifier = identifier; - DeploymentName = deploymentName; - Href = href; - Minidump = minidump; - IsProfileRunning = isProfileRunning; - IsIisProfileRunning = isIisProfileRunning; - IisProfileTimeoutInSeconds = iisProfileTimeoutInSeconds; - Parent = parent; - Children = children; - Threads = threads; - OpenFileHandles = openFileHandles; - Modules = modules; - FileName = fileName; - CommandLine = commandLine; - UserName = userName; - HandleCount = handleCount; - ModuleCount = moduleCount; - ThreadCount = threadCount; - StartTime = startTime; - TotalCpuTime = totalCpuTime; - UserCpuTime = userCpuTime; - PrivilegedCpuTime = privilegedCpuTime; - WorkingSet = workingSet; - PeakWorkingSet = peakWorkingSet; - PrivateMemory = privateMemory; - VirtualMemory = virtualMemory; - PeakVirtualMemory = peakVirtualMemory; - PagedSystemMemory = pagedSystemMemory; - NonPagedSystemMemory = nonPagedSystemMemory; - PagedMemory = pagedMemory; - PeakPagedMemory = peakPagedMemory; - TimeStamp = timeStamp; - EnvironmentVariables = environmentVariables; - IsScmSite = isScmSite; - IsWebjob = isWebjob; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets ARM Identifier for deployment. - /// - [JsonProperty(PropertyName = "properties.identifier")] - public int? Identifier { get; private set; } - - /// - /// Gets or sets deployment name. - /// - [JsonProperty(PropertyName = "properties.deployment_name")] - public string DeploymentName { get; set; } - - /// - /// Gets or sets hRef URI. - /// - [JsonProperty(PropertyName = "properties.href")] - public string Href { get; set; } - - /// - /// Gets or sets minidump URI. - /// - [JsonProperty(PropertyName = "properties.minidump")] - public string Minidump { get; set; } - - /// - /// Gets or sets is profile running? - /// - [JsonProperty(PropertyName = "properties.is_profile_running")] - public bool? IsProfileRunning { get; set; } - - /// - /// Gets or sets is the IIS Profile running? - /// - [JsonProperty(PropertyName = "properties.is_iis_profile_running")] - public bool? IsIisProfileRunning { get; set; } - - /// - /// Gets or sets IIS Profile timeout (seconds). - /// - [JsonProperty(PropertyName = "properties.iis_profile_timeout_in_seconds")] - public double? IisProfileTimeoutInSeconds { get; set; } - - /// - /// Gets or sets parent process. - /// - [JsonProperty(PropertyName = "properties.parent")] - public string Parent { get; set; } - - /// - /// Gets or sets child process list. - /// - [JsonProperty(PropertyName = "properties.children")] - public IList Children { get; set; } - - /// - /// Gets or sets thread list. - /// - [JsonProperty(PropertyName = "properties.threads")] - public IList Threads { get; set; } - - /// - /// Gets or sets list of open files. - /// - [JsonProperty(PropertyName = "properties.open_file_handles")] - public IList OpenFileHandles { get; set; } - - /// - /// Gets or sets list of modules. - /// - [JsonProperty(PropertyName = "properties.modules")] - public IList Modules { get; set; } - - /// - /// Gets or sets file name of this process. - /// - [JsonProperty(PropertyName = "properties.file_name")] - public string FileName { get; set; } - - /// - /// Gets or sets command line. - /// - [JsonProperty(PropertyName = "properties.command_line")] - public string CommandLine { get; set; } - - /// - /// Gets or sets user name. - /// - [JsonProperty(PropertyName = "properties.user_name")] - public string UserName { get; set; } - - /// - /// Gets or sets handle count. - /// - [JsonProperty(PropertyName = "properties.handle_count")] - public int? HandleCount { get; set; } - - /// - /// Gets or sets module count. - /// - [JsonProperty(PropertyName = "properties.module_count")] - public int? ModuleCount { get; set; } - - /// - /// Gets or sets thread count. - /// - [JsonProperty(PropertyName = "properties.thread_count")] - public int? ThreadCount { get; set; } - - /// - /// Gets or sets start time. - /// - [JsonProperty(PropertyName = "properties.start_time")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets total CPU time. - /// - [JsonProperty(PropertyName = "properties.total_cpu_time")] - public string TotalCpuTime { get; set; } - - /// - /// Gets or sets user CPU time. - /// - [JsonProperty(PropertyName = "properties.user_cpu_time")] - public string UserCpuTime { get; set; } - - /// - /// Gets or sets privileged CPU time. - /// - [JsonProperty(PropertyName = "properties.privileged_cpu_time")] - public string PrivilegedCpuTime { get; set; } - - /// - /// Gets or sets working set. - /// - [JsonProperty(PropertyName = "properties.working_set")] - public long? WorkingSet { get; set; } - - /// - /// Gets or sets peak working set. - /// - [JsonProperty(PropertyName = "properties.peak_working_set")] - public long? PeakWorkingSet { get; set; } - - /// - /// Gets or sets private memory size. - /// - [JsonProperty(PropertyName = "properties.private_memory")] - public long? PrivateMemory { get; set; } - - /// - /// Gets or sets virtual memory size. - /// - [JsonProperty(PropertyName = "properties.virtual_memory")] - public long? VirtualMemory { get; set; } - - /// - /// Gets or sets peak virtual memory usage. - /// - [JsonProperty(PropertyName = "properties.peak_virtual_memory")] - public long? PeakVirtualMemory { get; set; } - - /// - /// Gets or sets paged system memory. - /// - [JsonProperty(PropertyName = "properties.paged_system_memory")] - public long? PagedSystemMemory { get; set; } - - /// - /// Gets or sets non-paged system memory. - /// - [JsonProperty(PropertyName = "properties.non_paged_system_memory")] - public long? NonPagedSystemMemory { get; set; } - - /// - /// Gets or sets paged memory. - /// - [JsonProperty(PropertyName = "properties.paged_memory")] - public long? PagedMemory { get; set; } - - /// - /// Gets or sets peak paged memory. - /// - [JsonProperty(PropertyName = "properties.peak_paged_memory")] - public long? PeakPagedMemory { get; set; } - - /// - /// Gets or sets time stamp. - /// - [JsonProperty(PropertyName = "properties.time_stamp")] - public System.DateTime? TimeStamp { get; set; } - - /// - /// Gets or sets list of environment variables. - /// - [JsonProperty(PropertyName = "properties.environment_variables")] - public IDictionary EnvironmentVariables { get; set; } - - /// - /// Gets or sets is this the SCM site? - /// - [JsonProperty(PropertyName = "properties.is_scm_site")] - public bool? IsScmSite { get; set; } - - /// - /// Gets or sets is this a Web Job? - /// - [JsonProperty(PropertyName = "properties.is_webjob")] - public bool? IsWebjob { get; set; } - - /// - /// Gets or sets description of process. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessModuleInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessModuleInfo.cs deleted file mode 100644 index 3f3c4a14c836..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessModuleInfo.cs +++ /dev/null @@ -1,141 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Process Module Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class ProcessModuleInfo : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ProcessModuleInfo class. - /// - public ProcessModuleInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProcessModuleInfo class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Base address. Used as module identifier - /// in ARM resource URI. - /// File name. - /// HRef URI. - /// File path. - /// Module memory size. - /// File version. - /// File description. - /// Product name. - /// Product version. - /// Is debug? - /// Module language (locale). - public ProcessModuleInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string baseAddress = default(string), string fileName = default(string), string href = default(string), string filePath = default(string), int? moduleMemorySize = default(int?), string fileVersion = default(string), string fileDescription = default(string), string product = default(string), string productVersion = default(string), bool? isDebug = default(bool?), string language = default(string)) - : base(id, name, kind, type) - { - BaseAddress = baseAddress; - FileName = fileName; - Href = href; - FilePath = filePath; - ModuleMemorySize = moduleMemorySize; - FileVersion = fileVersion; - FileDescription = fileDescription; - Product = product; - ProductVersion = productVersion; - IsDebug = isDebug; - Language = language; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets base address. Used as module identifier in ARM - /// resource URI. - /// - [JsonProperty(PropertyName = "properties.base_address")] - public string BaseAddress { get; set; } - - /// - /// Gets or sets file name. - /// - [JsonProperty(PropertyName = "properties.file_name")] - public string FileName { get; set; } - - /// - /// Gets or sets hRef URI. - /// - [JsonProperty(PropertyName = "properties.href")] - public string Href { get; set; } - - /// - /// Gets or sets file path. - /// - [JsonProperty(PropertyName = "properties.file_path")] - public string FilePath { get; set; } - - /// - /// Gets or sets module memory size. - /// - [JsonProperty(PropertyName = "properties.module_memory_size")] - public int? ModuleMemorySize { get; set; } - - /// - /// Gets or sets file version. - /// - [JsonProperty(PropertyName = "properties.file_version")] - public string FileVersion { get; set; } - - /// - /// Gets or sets file description. - /// - [JsonProperty(PropertyName = "properties.file_description")] - public string FileDescription { get; set; } - - /// - /// Gets or sets product name. - /// - [JsonProperty(PropertyName = "properties.product")] - public string Product { get; set; } - - /// - /// Gets or sets product version. - /// - [JsonProperty(PropertyName = "properties.product_version")] - public string ProductVersion { get; set; } - - /// - /// Gets or sets is debug? - /// - [JsonProperty(PropertyName = "properties.is_debug")] - public bool? IsDebug { get; set; } - - /// - /// Gets or sets module language (locale). - /// - [JsonProperty(PropertyName = "properties.language")] - public string Language { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessThreadInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessThreadInfo.cs deleted file mode 100644 index 7e37d356eccf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProcessThreadInfo.cs +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Process Thread Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class ProcessThreadInfo : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ProcessThreadInfo class. - /// - public ProcessThreadInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProcessThreadInfo class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Site extension ID. - /// HRef URI. - /// Process URI. - /// Start address. - /// Current thread priority. - /// Thread priority level. - /// Base priority. - /// Start time. - /// Total processor time. - /// User processor time. - /// Thread state. - /// Wait reason. - public ProcessThreadInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? identifier = default(int?), string href = default(string), string process = default(string), string startAddress = default(string), int? currentPriority = default(int?), string priorityLevel = default(string), int? basePriority = default(int?), System.DateTime? startTime = default(System.DateTime?), string totalProcessorTime = default(string), string userProcessorTime = default(string), string state = default(string), string waitReason = default(string)) - : base(id, name, kind, type) - { - Identifier = identifier; - Href = href; - Process = process; - StartAddress = startAddress; - CurrentPriority = currentPriority; - PriorityLevel = priorityLevel; - BasePriority = basePriority; - StartTime = startTime; - TotalProcessorTime = totalProcessorTime; - UserProcessorTime = userProcessorTime; - State = state; - WaitReason = waitReason; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets site extension ID. - /// - [JsonProperty(PropertyName = "properties.identifier")] - public int? Identifier { get; private set; } - - /// - /// Gets or sets hRef URI. - /// - [JsonProperty(PropertyName = "properties.href")] - public string Href { get; set; } - - /// - /// Gets or sets process URI. - /// - [JsonProperty(PropertyName = "properties.process")] - public string Process { get; set; } - - /// - /// Gets or sets start address. - /// - [JsonProperty(PropertyName = "properties.start_address")] - public string StartAddress { get; set; } - - /// - /// Gets or sets current thread priority. - /// - [JsonProperty(PropertyName = "properties.current_priority")] - public int? CurrentPriority { get; set; } - - /// - /// Gets or sets thread priority level. - /// - [JsonProperty(PropertyName = "properties.priority_level")] - public string PriorityLevel { get; set; } - - /// - /// Gets or sets base priority. - /// - [JsonProperty(PropertyName = "properties.base_priority")] - public int? BasePriority { get; set; } - - /// - /// Gets or sets start time. - /// - [JsonProperty(PropertyName = "properties.start_time")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets total processor time. - /// - [JsonProperty(PropertyName = "properties.total_processor_time")] - public string TotalProcessorTime { get; set; } - - /// - /// Gets or sets user processor time. - /// - [JsonProperty(PropertyName = "properties.user_processor_time")] - public string UserProcessorTime { get; set; } - - /// - /// Gets or sets thread state. - /// - [JsonProperty(PropertyName = "properties.state")] - public string State { get; set; } - - /// - /// Gets or sets wait reason. - /// - [JsonProperty(PropertyName = "properties.wait_reason")] - public string WaitReason { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProvisioningState.cs deleted file mode 100644 index 7a208e971733..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProvisioningState.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ProvisioningState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ProvisioningState - { - [EnumMember(Value = "Succeeded")] - Succeeded, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Canceled")] - Canceled, - [EnumMember(Value = "InProgress")] - InProgress, - [EnumMember(Value = "Deleting")] - Deleting - } - internal static class ProvisioningStateEnumExtension - { - internal static string ToSerializedValue(this ProvisioningState? value) - { - return value == null ? null : ((ProvisioningState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ProvisioningState value) - { - switch( value ) - { - case ProvisioningState.Succeeded: - return "Succeeded"; - case ProvisioningState.Failed: - return "Failed"; - case ProvisioningState.Canceled: - return "Canceled"; - case ProvisioningState.InProgress: - return "InProgress"; - case ProvisioningState.Deleting: - return "Deleting"; - } - return null; - } - - internal static ProvisioningState? ParseProvisioningState(this string value) - { - switch( value ) - { - case "Succeeded": - return ProvisioningState.Succeeded; - case "Failed": - return ProvisioningState.Failed; - case "Canceled": - return ProvisioningState.Canceled; - case "InProgress": - return ProvisioningState.InProgress; - case "Deleting": - return ProvisioningState.Deleting; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProxyOnlyResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProxyOnlyResource.cs deleted file mode 100644 index 1f933160fd10..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ProxyOnlyResource.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Azure proxy only resource. This resource is not tracked by Azure - /// Resource Manager. - /// - public partial class ProxyOnlyResource : IResource - { - /// - /// Initializes a new instance of the ProxyOnlyResource class. - /// - public ProxyOnlyResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ProxyOnlyResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public ProxyOnlyResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string)) - { - Id = id; - Name = name; - Kind = kind; - 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 or sets kind of resource. - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets resource type. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificate.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificate.cs deleted file mode 100644 index fd1011837ada..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificate.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Public certificate object - /// - [Rest.Serialization.JsonTransformation] - public partial class PublicCertificate : ProxyOnlyResource - { - /// - /// Initializes a new instance of the PublicCertificate class. - /// - public PublicCertificate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PublicCertificate class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Public Certificate byte array - /// Public Certificate - /// Location. Possible values include: 'CurrentUserMy', - /// 'LocalMachineMy', 'Unknown' - /// Certificate Thumbprint - public PublicCertificate(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), byte[] blob = default(byte[]), PublicCertificateLocation? publicCertificateLocation = default(PublicCertificateLocation?), string thumbprint = default(string)) - : base(id, name, kind, type) - { - Blob = blob; - PublicCertificateLocation = publicCertificateLocation; - Thumbprint = thumbprint; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets public Certificate byte array - /// - [JsonProperty(PropertyName = "properties.blob")] - public byte[] Blob { get; set; } - - /// - /// Gets or sets public Certificate Location. Possible values include: - /// 'CurrentUserMy', 'LocalMachineMy', 'Unknown' - /// - [JsonProperty(PropertyName = "properties.publicCertificateLocation")] - public PublicCertificateLocation? PublicCertificateLocation { get; set; } - - /// - /// Gets certificate Thumbprint - /// - [JsonProperty(PropertyName = "properties.thumbprint")] - public string Thumbprint { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificateLocation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificateLocation.cs deleted file mode 100644 index c254bed35845..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublicCertificateLocation.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for PublicCertificateLocation. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum PublicCertificateLocation - { - [EnumMember(Value = "CurrentUserMy")] - CurrentUserMy, - [EnumMember(Value = "LocalMachineMy")] - LocalMachineMy, - [EnumMember(Value = "Unknown")] - Unknown - } - internal static class PublicCertificateLocationEnumExtension - { - internal static string ToSerializedValue(this PublicCertificateLocation? value) - { - return value == null ? null : ((PublicCertificateLocation)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this PublicCertificateLocation value) - { - switch( value ) - { - case PublicCertificateLocation.CurrentUserMy: - return "CurrentUserMy"; - case PublicCertificateLocation.LocalMachineMy: - return "LocalMachineMy"; - case PublicCertificateLocation.Unknown: - return "Unknown"; - } - return null; - } - - internal static PublicCertificateLocation? ParsePublicCertificateLocation(this string value) - { - switch( value ) - { - case "CurrentUserMy": - return PublicCertificateLocation.CurrentUserMy; - case "LocalMachineMy": - return PublicCertificateLocation.LocalMachineMy; - case "Unknown": - return PublicCertificateLocation.Unknown; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublishingProfileFormat.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublishingProfileFormat.cs deleted file mode 100644 index 7d99293b079e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PublishingProfileFormat.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for PublishingProfileFormat. - /// - public static class PublishingProfileFormat - { - public const string FileZilla3 = "FileZilla3"; - public const string WebDeploy = "WebDeploy"; - public const string Ftp = "Ftp"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PushSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PushSettings.cs deleted file mode 100644 index 890d9b51bd1e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/PushSettings.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Push settings for the App. - /// - [Rest.Serialization.JsonTransformation] - public partial class PushSettings : ProxyOnlyResource - { - /// - /// Initializes a new instance of the PushSettings class. - /// - public PushSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the PushSettings class. - /// - /// Gets or sets a flag indicating whether - /// the Push endpoint is enabled. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Gets or sets a JSON string - /// containing a list of tags that are whitelisted for use by the push - /// registration endpoint. - /// Gets or sets a JSON string - /// containing a list of tags that require user authentication to be - /// used in the push registration endpoint. - /// Tags can consist of alphanumeric characters and the following: - /// '_', '@', '#', '.', ':', '-'. - /// Validation should be performed at the PushRequestHandler. - /// Gets or sets a JSON string containing - /// a list of dynamic tags that will be evaluated from user claims in - /// the push registration endpoint. - public PushSettings(bool isPushEnabled, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string tagWhitelistJson = default(string), string tagsRequiringAuth = default(string), string dynamicTagsJson = default(string)) - : base(id, name, kind, type) - { - IsPushEnabled = isPushEnabled; - TagWhitelistJson = tagWhitelistJson; - TagsRequiringAuth = tagsRequiringAuth; - DynamicTagsJson = dynamicTagsJson; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a flag indicating whether the Push endpoint is - /// enabled. - /// - [JsonProperty(PropertyName = "properties.isPushEnabled")] - public bool IsPushEnabled { get; set; } - - /// - /// Gets or sets a JSON string containing a list of tags that are - /// whitelisted for use by the push registration endpoint. - /// - [JsonProperty(PropertyName = "properties.tagWhitelistJson")] - public string TagWhitelistJson { get; set; } - - /// - /// Gets or sets a JSON string containing a list of tags that require - /// user authentication to be used in the push registration endpoint. - /// Tags can consist of alphanumeric characters and the following: - /// '_', '@', '#', '.', ':', '-'. - /// Validation should be performed at the PushRequestHandler. - /// - [JsonProperty(PropertyName = "properties.tagsRequiringAuth")] - public string TagsRequiringAuth { get; set; } - - /// - /// Gets or sets a JSON string containing a list of dynamic tags that - /// will be evaluated from user claims in the push registration - /// endpoint. - /// - [JsonProperty(PropertyName = "properties.dynamicTagsJson")] - public string DynamicTagsJson { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - //Nothing to validate - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs deleted file mode 100644 index eeffe769f026..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResult.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Result for utterances query. - /// - public partial class QueryUtterancesResult - { - /// - /// Initializes a new instance of the QueryUtterancesResult class. - /// - public QueryUtterancesResult() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the QueryUtterancesResult class. - /// - /// A sample utterance. - /// Score of a sample utterance. - public QueryUtterancesResult(SampleUtterance sampleUtterance = default(SampleUtterance), double? score = default(double?)) - { - SampleUtterance = sampleUtterance; - Score = score; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets a sample utterance. - /// - [JsonProperty(PropertyName = "sampleUtterance")] - public SampleUtterance SampleUtterance { get; set; } - - /// - /// Gets or sets score of a sample utterance. - /// - [JsonProperty(PropertyName = "score")] - public double? Score { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs deleted file mode 100644 index 9d352753d920..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueryUtterancesResults.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Suggested utterances where the detector can be applicable - /// - public partial class QueryUtterancesResults - { - /// - /// Initializes a new instance of the QueryUtterancesResults class. - /// - public QueryUtterancesResults() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the QueryUtterancesResults class. - /// - /// Search Query. - /// Array of utterance results for search - /// query. - public QueryUtterancesResults(string query = default(string), IList results = default(IList)) - { - Query = query; - Results = results; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets search Query. - /// - [JsonProperty(PropertyName = "query")] - public string Query { get; set; } - - /// - /// Gets or sets array of utterance results for search query. - /// - [JsonProperty(PropertyName = "results")] - public IList Results { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs deleted file mode 100644 index b466657a5a11..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/QueueScaleRule.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App container Azure Queue based scaling rule. - /// - public partial class QueueScaleRule - { - /// - /// Initializes a new instance of the QueueScaleRule class. - /// - public QueueScaleRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the QueueScaleRule class. - /// - /// Queue name. - /// Queue length. - /// Authentication secrets for the queue scale - /// rule. - public QueueScaleRule(string queueName = default(string), int? queueLength = default(int?), IList auth = default(IList)) - { - QueueName = queueName; - QueueLength = queueLength; - Auth = auth; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets queue name. - /// - [JsonProperty(PropertyName = "queueName")] - public string QueueName { get; set; } - - /// - /// Gets or sets queue length. - /// - [JsonProperty(PropertyName = "queueLength")] - public int? QueueLength { get; set; } - - /// - /// Gets or sets authentication secrets for the queue scale rule. - /// - [JsonProperty(PropertyName = "auth")] - public IList Auth { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RampUpRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RampUpRule.cs deleted file mode 100644 index 4647553a245d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RampUpRule.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Routing rules for ramp up testing. This rule allows to redirect static - /// traffic % to a slot or to gradually change routing % based on - /// performance. - /// - public partial class RampUpRule - { - /// - /// Initializes a new instance of the RampUpRule class. - /// - public RampUpRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RampUpRule class. - /// - /// Hostname of a slot to which the - /// traffic will be redirected if decided to. E.g. - /// myapp-stage.azurewebsites.net. - /// Percentage of the traffic which - /// will be redirected to - /// <code>ActionHostName</code>. - /// In auto ramp up scenario this is the step - /// to add/remove from <code>ReroutePercentage</code> until - /// it reaches \n<code>MinReroutePercentage</code> or - /// <code>MaxReroutePercentage</code>. Site metrics are - /// checked every N minutes specified in - /// <code>ChangeIntervalInMinutes</code>.\nCustom decision - /// algorithm - /// can be provided in TiPCallback site extension which URL can be - /// specified in - /// <code>ChangeDecisionCallbackUrl</code>. - /// Specifies interval in minutes - /// to reevaluate ReroutePercentage. - /// Specifies lower boundary above - /// which ReroutePercentage will stay. - /// Specifies upper boundary below - /// which ReroutePercentage will stay. - /// Custom decision algorithm - /// can be provided in TiPCallback site extension which URL can be - /// specified. See TiPCallback site extension for the scaffold and - /// contracts. - /// https://www.siteextensions.net/packages/TiPCallback/ - /// Name of the routing rule. The recommended name - /// would be to point to the slot which will receive the traffic in the - /// experiment. - public RampUpRule(string actionHostName = default(string), double? reroutePercentage = default(double?), double? changeStep = default(double?), int? changeIntervalInMinutes = default(int?), double? minReroutePercentage = default(double?), double? maxReroutePercentage = default(double?), string changeDecisionCallbackUrl = default(string), string name = default(string)) - { - ActionHostName = actionHostName; - ReroutePercentage = reroutePercentage; - ChangeStep = changeStep; - ChangeIntervalInMinutes = changeIntervalInMinutes; - MinReroutePercentage = minReroutePercentage; - MaxReroutePercentage = maxReroutePercentage; - ChangeDecisionCallbackUrl = changeDecisionCallbackUrl; - Name = name; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets hostname of a slot to which the traffic will be - /// redirected if decided to. E.g. myapp-stage.azurewebsites.net. - /// - [JsonProperty(PropertyName = "actionHostName")] - public string ActionHostName { get; set; } - - /// - /// Gets or sets percentage of the traffic which will be redirected to - /// &lt;code&gt;ActionHostName&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "reroutePercentage")] - public double? ReroutePercentage { get; set; } - - /// - /// Gets or sets in auto ramp up scenario this is the step to - /// add/remove from - /// &lt;code&gt;ReroutePercentage&lt;/code&gt; until it - /// reaches - /// \n&lt;code&gt;MinReroutePercentage&lt;/code&gt; or - /// &lt;code&gt;MaxReroutePercentage&lt;/code&gt;. Site - /// metrics are checked every N minutes specified in - /// &lt;code&gt;ChangeIntervalInMinutes&lt;/code&gt;.\nCustom - /// decision algorithm - /// can be provided in TiPCallback site extension which URL can be - /// specified in - /// &lt;code&gt;ChangeDecisionCallbackUrl&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "changeStep")] - public double? ChangeStep { get; set; } - - /// - /// Gets or sets specifies interval in minutes to reevaluate - /// ReroutePercentage. - /// - [JsonProperty(PropertyName = "changeIntervalInMinutes")] - public int? ChangeIntervalInMinutes { get; set; } - - /// - /// Gets or sets specifies lower boundary above which ReroutePercentage - /// will stay. - /// - [JsonProperty(PropertyName = "minReroutePercentage")] - public double? MinReroutePercentage { get; set; } - - /// - /// Gets or sets specifies upper boundary below which ReroutePercentage - /// will stay. - /// - [JsonProperty(PropertyName = "maxReroutePercentage")] - public double? MaxReroutePercentage { get; set; } - - /// - /// Gets or sets custom decision algorithm can be provided in - /// TiPCallback site extension which URL can be specified. See - /// TiPCallback site extension for the scaffold and contracts. - /// https://www.siteextensions.net/packages/TiPCallback/ - /// - [JsonProperty(PropertyName = "changeDecisionCallbackUrl")] - public string ChangeDecisionCallbackUrl { get; set; } - - /// - /// Gets or sets name of the routing rule. The recommended name would - /// be to point to the slot which will receive the traffic in the - /// experiment. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Recommendation.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Recommendation.cs deleted file mode 100644 index 91e53bd92e74..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Recommendation.cs +++ /dev/null @@ -1,280 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a recommendation result generated by the recommendation - /// engine. - /// - [Rest.Serialization.JsonTransformation] - public partial class Recommendation : ProxyOnlyResource - { - /// - /// Initializes a new instance of the Recommendation class. - /// - public Recommendation() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Recommendation class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Timestamp when this instance was - /// created. - /// A GUID value that each - /// recommendation object is associated with. - /// Full ARM resource ID string that this - /// recommendation object is associated with. - /// Name of a resource type this - /// recommendation applies, e.g. Subscription, ServerFarm, Site. - /// Possible values include: 'ServerFarm', 'Subscription', - /// 'WebSite' - /// Unique name of the rule. - /// UI friendly name of the rule (may not be - /// unique). - /// Recommendation text. - /// Level indicating how critical this - /// recommendation can impact. Possible values include: 'Critical', - /// 'Warning', 'Information', 'NonUrgentSuggestion' - /// List of channels that this recommendation - /// can apply. Possible values include: 'Notification', 'Api', 'Email', - /// 'Webhook', 'All' - /// The list of category tags that this - /// recommendation belongs to. - /// Name of action recommended by this - /// object. - /// True if this recommendation is still valid - /// (i.e. "actionable"). False if it is invalid. - /// The list of states of this recommendation. If - /// it's null then it should be considered "Active". - /// The beginning time in UTC of a range that - /// the recommendation refers to. - /// The end time in UTC of a range that the - /// recommendation refers to. - /// When to notify this - /// recommendation next in UTC. Null means that this will never be - /// notified anymore. - /// Date and time in UTC when - /// this notification expires. - /// Last timestamp in UTC this instance was - /// actually notified. Null means that this recommendation hasn't been - /// notified yet. - /// A metric value measured by the rule. - /// True if this is associated with a - /// dynamically added rule - /// Extension name of the portal if - /// exists. - /// Deep link to a blade on the portal. - /// Forward link to an external document - /// associated with the rule. - public Recommendation(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), System.DateTime? creationTime = default(System.DateTime?), System.Guid? recommendationId = default(System.Guid?), string resourceId = default(string), string resourceScope = default(string), string ruleName = default(string), string displayName = default(string), string message = default(string), NotificationLevel? level = default(NotificationLevel?), Channels? channels = default(Channels?), IList categoryTags = default(IList), string actionName = default(string), int? enabled = default(int?), IList states = default(IList), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), System.DateTime? nextNotificationTime = default(System.DateTime?), System.DateTime? notificationExpirationTime = default(System.DateTime?), System.DateTime? notifiedTime = default(System.DateTime?), double? score = default(double?), bool? isDynamic = default(bool?), string extensionName = default(string), string bladeName = default(string), string forwardLink = default(string)) - : base(id, name, kind, type) - { - CreationTime = creationTime; - RecommendationId = recommendationId; - ResourceId = resourceId; - ResourceScope = resourceScope; - RuleName = ruleName; - DisplayName = displayName; - Message = message; - Level = level; - Channels = channels; - CategoryTags = categoryTags; - ActionName = actionName; - Enabled = enabled; - States = states; - StartTime = startTime; - EndTime = endTime; - NextNotificationTime = nextNotificationTime; - NotificationExpirationTime = notificationExpirationTime; - NotifiedTime = notifiedTime; - Score = score; - IsDynamic = isDynamic; - ExtensionName = extensionName; - BladeName = bladeName; - ForwardLink = forwardLink; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets timestamp when this instance was created. - /// - [JsonProperty(PropertyName = "properties.creationTime")] - public System.DateTime? CreationTime { get; set; } - - /// - /// Gets or sets a GUID value that each recommendation object is - /// associated with. - /// - [JsonProperty(PropertyName = "properties.recommendationId")] - public System.Guid? RecommendationId { get; set; } - - /// - /// Gets or sets full ARM resource ID string that this recommendation - /// object is associated with. - /// - [JsonProperty(PropertyName = "properties.resourceId")] - public string ResourceId { get; set; } - - /// - /// Gets or sets name of a resource type this recommendation applies, - /// e.g. Subscription, ServerFarm, Site. Possible values include: - /// 'ServerFarm', 'Subscription', 'WebSite' - /// - [JsonProperty(PropertyName = "properties.resourceScope")] - public string ResourceScope { get; set; } - - /// - /// Gets or sets unique name of the rule. - /// - [JsonProperty(PropertyName = "properties.ruleName")] - public string RuleName { get; set; } - - /// - /// Gets or sets UI friendly name of the rule (may not be unique). - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets recommendation text. - /// - [JsonProperty(PropertyName = "properties.message")] - public string Message { get; set; } - - /// - /// Gets or sets level indicating how critical this recommendation can - /// impact. Possible values include: 'Critical', 'Warning', - /// 'Information', 'NonUrgentSuggestion' - /// - [JsonProperty(PropertyName = "properties.level")] - public NotificationLevel? Level { get; set; } - - /// - /// Gets or sets list of channels that this recommendation can apply. - /// Possible values include: 'Notification', 'Api', 'Email', 'Webhook', - /// 'All' - /// - [JsonProperty(PropertyName = "properties.channels")] - public Channels? Channels { get; set; } - - /// - /// Gets the list of category tags that this recommendation belongs to. - /// - [JsonProperty(PropertyName = "properties.categoryTags")] - public IList CategoryTags { get; private set; } - - /// - /// Gets or sets name of action recommended by this object. - /// - [JsonProperty(PropertyName = "properties.actionName")] - public string ActionName { get; set; } - - /// - /// Gets or sets true if this recommendation is still valid (i.e. - /// "actionable"). False if it is invalid. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public int? Enabled { get; set; } - - /// - /// Gets or sets the list of states of this recommendation. If it's - /// null then it should be considered "Active". - /// - [JsonProperty(PropertyName = "properties.states")] - public IList States { get; set; } - - /// - /// Gets or sets the beginning time in UTC of a range that the - /// recommendation refers to. - /// - [JsonProperty(PropertyName = "properties.startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets the end time in UTC of a range that the recommendation - /// refers to. - /// - [JsonProperty(PropertyName = "properties.endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets when to notify this recommendation next in UTC. Null - /// means that this will never be notified anymore. - /// - [JsonProperty(PropertyName = "properties.nextNotificationTime")] - public System.DateTime? NextNotificationTime { get; set; } - - /// - /// Gets or sets date and time in UTC when this notification expires. - /// - [JsonProperty(PropertyName = "properties.notificationExpirationTime")] - public System.DateTime? NotificationExpirationTime { get; set; } - - /// - /// Gets or sets last timestamp in UTC this instance was actually - /// notified. Null means that this recommendation hasn't been notified - /// yet. - /// - [JsonProperty(PropertyName = "properties.notifiedTime")] - public System.DateTime? NotifiedTime { get; set; } - - /// - /// Gets or sets a metric value measured by the rule. - /// - [JsonProperty(PropertyName = "properties.score")] - public double? Score { get; set; } - - /// - /// Gets or sets true if this is associated with a dynamically added - /// rule - /// - [JsonProperty(PropertyName = "properties.isDynamic")] - public bool? IsDynamic { get; set; } - - /// - /// Gets or sets extension name of the portal if exists. - /// - [JsonProperty(PropertyName = "properties.extensionName")] - public string ExtensionName { get; set; } - - /// - /// Gets or sets deep link to a blade on the portal. - /// - [JsonProperty(PropertyName = "properties.bladeName")] - public string BladeName { get; set; } - - /// - /// Gets or sets forward link to an external document associated with - /// the rule. - /// - [JsonProperty(PropertyName = "properties.forwardLink")] - public string ForwardLink { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RecommendationRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RecommendationRule.cs deleted file mode 100644 index 79ad1c3a6199..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RecommendationRule.cs +++ /dev/null @@ -1,184 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents a recommendation rule that the recommendation engine can - /// perform. - /// - [Rest.Serialization.JsonTransformation] - public partial class RecommendationRule : ProxyOnlyResource - { - /// - /// Initializes a new instance of the RecommendationRule class. - /// - public RecommendationRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RecommendationRule class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Unique name of the rule. - /// UI friendly name of the rule. - /// Localized name of the rule (Good for - /// UI). - /// Recommendation ID of an associated - /// recommendation object tied to the rule, if exists. - /// If such an object doesn't exist, it is set to null. - /// Localized detailed description of the - /// rule. - /// Name of action that is recommended by this - /// rule in string. - /// Level of impact indicating how critical this - /// rule is. Possible values include: 'Critical', 'Warning', - /// 'Information', 'NonUrgentSuggestion' - /// List of available channels that this rule - /// applies. Possible values include: 'Notification', 'Api', 'Email', - /// 'Webhook', 'All' - /// The list of category tags that this - /// recommendation rule belongs to. - /// True if this is associated with a - /// dynamically added rule - /// Extension name of the portal if exists. - /// Applicable to dynamic rule only. - /// Deep link to a blade on the portal. - /// Applicable to dynamic rule only. - /// Forward link to an external document - /// associated with the rule. Applicable to dynamic rule only. - public RecommendationRule(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string recommendationName = default(string), string displayName = default(string), string message = default(string), System.Guid? recommendationId = default(System.Guid?), string description = default(string), string actionName = default(string), NotificationLevel? level = default(NotificationLevel?), Channels? channels = default(Channels?), IList categoryTags = default(IList), bool? isDynamic = default(bool?), string extensionName = default(string), string bladeName = default(string), string forwardLink = default(string)) - : base(id, name, kind, type) - { - RecommendationName = recommendationName; - DisplayName = displayName; - Message = message; - RecommendationId = recommendationId; - Description = description; - ActionName = actionName; - Level = level; - Channels = channels; - CategoryTags = categoryTags; - IsDynamic = isDynamic; - ExtensionName = extensionName; - BladeName = bladeName; - ForwardLink = forwardLink; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique name of the rule. - /// - [JsonProperty(PropertyName = "properties.recommendationName")] - public string RecommendationName { get; set; } - - /// - /// Gets or sets UI friendly name of the rule. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets localized name of the rule (Good for UI). - /// - [JsonProperty(PropertyName = "properties.message")] - public string Message { get; set; } - - /// - /// Gets or sets recommendation ID of an associated recommendation - /// object tied to the rule, if exists. - /// If such an object doesn't exist, it is set to null. - /// - [JsonProperty(PropertyName = "properties.recommendationId")] - public System.Guid? RecommendationId { get; set; } - - /// - /// Gets or sets localized detailed description of the rule. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets name of action that is recommended by this rule in - /// string. - /// - [JsonProperty(PropertyName = "properties.actionName")] - public string ActionName { get; set; } - - /// - /// Gets or sets level of impact indicating how critical this rule is. - /// Possible values include: 'Critical', 'Warning', 'Information', - /// 'NonUrgentSuggestion' - /// - [JsonProperty(PropertyName = "properties.level")] - public NotificationLevel? Level { get; set; } - - /// - /// Gets or sets list of available channels that this rule applies. - /// Possible values include: 'Notification', 'Api', 'Email', 'Webhook', - /// 'All' - /// - [JsonProperty(PropertyName = "properties.channels")] - public Channels? Channels { get; set; } - - /// - /// Gets the list of category tags that this recommendation rule - /// belongs to. - /// - [JsonProperty(PropertyName = "properties.categoryTags")] - public IList CategoryTags { get; private set; } - - /// - /// Gets or sets true if this is associated with a dynamically added - /// rule - /// - [JsonProperty(PropertyName = "properties.isDynamic")] - public bool? IsDynamic { get; set; } - - /// - /// Gets or sets extension name of the portal if exists. Applicable to - /// dynamic rule only. - /// - [JsonProperty(PropertyName = "properties.extensionName")] - public string ExtensionName { get; set; } - - /// - /// Gets or sets deep link to a blade on the portal. Applicable to - /// dynamic rule only. - /// - [JsonProperty(PropertyName = "properties.bladeName")] - public string BladeName { get; set; } - - /// - /// Gets or sets forward link to an external document associated with - /// the rule. Applicable to dynamic rule only. - /// - [JsonProperty(PropertyName = "properties.forwardLink")] - public string ForwardLink { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RedundancyMode.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RedundancyMode.cs deleted file mode 100644 index 555eec94aacc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RedundancyMode.cs +++ /dev/null @@ -1,78 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for RedundancyMode. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RedundancyMode - { - [EnumMember(Value = "None")] - None, - [EnumMember(Value = "Manual")] - Manual, - [EnumMember(Value = "Failover")] - Failover, - [EnumMember(Value = "ActiveActive")] - ActiveActive, - [EnumMember(Value = "GeoRedundant")] - GeoRedundant - } - internal static class RedundancyModeEnumExtension - { - internal static string ToSerializedValue(this RedundancyMode? value) - { - return value == null ? null : ((RedundancyMode)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RedundancyMode value) - { - switch( value ) - { - case RedundancyMode.None: - return "None"; - case RedundancyMode.Manual: - return "Manual"; - case RedundancyMode.Failover: - return "Failover"; - case RedundancyMode.ActiveActive: - return "ActiveActive"; - case RedundancyMode.GeoRedundant: - return "GeoRedundant"; - } - return null; - } - - internal static RedundancyMode? ParseRedundancyMode(this string value) - { - switch( value ) - { - case "None": - return RedundancyMode.None; - case "Manual": - return RedundancyMode.Manual; - case "Failover": - return RedundancyMode.Failover; - case "ActiveActive": - return RedundancyMode.ActiveActive; - case "GeoRedundant": - return RedundancyMode.GeoRedundant; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs deleted file mode 100644 index f0cc83620c25..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RegistryCredentials.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App Private Registry - /// - public partial class RegistryCredentials - { - /// - /// Initializes a new instance of the RegistryCredentials class. - /// - public RegistryCredentials() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RegistryCredentials class. - /// - /// Container Registry Server - /// Container Registry Username - /// The name of the Secret that - /// contains the registry login password - public RegistryCredentials(string server = default(string), string username = default(string), string passwordSecretRef = default(string)) - { - Server = server; - Username = username; - PasswordSecretRef = passwordSecretRef; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets container Registry Server - /// - [JsonProperty(PropertyName = "server")] - public string Server { get; set; } - - /// - /// Gets or sets container Registry Username - /// - [JsonProperty(PropertyName = "username")] - public string Username { get; set; } - - /// - /// Gets or sets the name of the Secret that contains the registry - /// login password - /// - [JsonProperty(PropertyName = "passwordSecretRef")] - public string PasswordSecretRef { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ReissueCertificateOrderRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ReissueCertificateOrderRequest.cs deleted file mode 100644 index 6cc305676cc6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ReissueCertificateOrderRequest.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Class representing certificate reissue request. - /// - [Rest.Serialization.JsonTransformation] - public partial class ReissueCertificateOrderRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ReissueCertificateOrderRequest - /// class. - /// - public ReissueCertificateOrderRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ReissueCertificateOrderRequest - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Certificate Key Size. - /// Delay in hours to revoke - /// existing certificate after the new certificate is issued. - /// Csr to be used for re-key operation. - /// Should we change the ASC type - /// (from managed private key to external private key and vice - /// versa). - public ReissueCertificateOrderRequest(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? keySize = default(int?), int? delayExistingRevokeInHours = default(int?), string csr = default(string), bool? isPrivateKeyExternal = default(bool?)) - : base(id, name, kind, type) - { - KeySize = keySize; - DelayExistingRevokeInHours = delayExistingRevokeInHours; - Csr = csr; - IsPrivateKeyExternal = isPrivateKeyExternal; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets certificate Key Size. - /// - [JsonProperty(PropertyName = "properties.keySize")] - public int? KeySize { get; set; } - - /// - /// Gets or sets delay in hours to revoke existing certificate after - /// the new certificate is issued. - /// - [JsonProperty(PropertyName = "properties.delayExistingRevokeInHours")] - public int? DelayExistingRevokeInHours { get; set; } - - /// - /// Gets or sets csr to be used for re-key operation. - /// - [JsonProperty(PropertyName = "properties.csr")] - public string Csr { get; set; } - - /// - /// Gets or sets should we change the ASC type (from managed private - /// key to external private key and vice versa). - /// - [JsonProperty(PropertyName = "properties.isPrivateKeyExternal")] - public bool? IsPrivateKeyExternal { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RelayServiceConnectionEntity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RelayServiceConnectionEntity.cs deleted file mode 100644 index 9323d5b30647..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RelayServiceConnectionEntity.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Hybrid Connection for an App Service app. - /// - [Rest.Serialization.JsonTransformation] - public partial class RelayServiceConnectionEntity : ProxyOnlyResource - { - /// - /// Initializes a new instance of the RelayServiceConnectionEntity - /// class. - /// - public RelayServiceConnectionEntity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RelayServiceConnectionEntity - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - public RelayServiceConnectionEntity(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string entityName = default(string), string entityConnectionString = default(string), string resourceType = default(string), string resourceConnectionString = default(string), string hostname = default(string), int? port = default(int?), string biztalkUri = default(string)) - : base(id, name, kind, type) - { - EntityName = entityName; - EntityConnectionString = entityConnectionString; - ResourceType = resourceType; - ResourceConnectionString = resourceConnectionString; - Hostname = hostname; - Port = port; - BiztalkUri = biztalkUri; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.entityName")] - public string EntityName { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.entityConnectionString")] - public string EntityConnectionString { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.resourceType")] - public string ResourceType { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.resourceConnectionString")] - public string ResourceConnectionString { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.hostname")] - public string Hostname { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.port")] - public int? Port { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.biztalkUri")] - public string BiztalkUri { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs deleted file mode 100644 index e2e9a33b6d78..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnection.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A remote private endpoint connection - /// - [Rest.Serialization.JsonTransformation] - public partial class RemotePrivateEndpointConnection : ProxyOnlyResource - { - /// - /// Initializes a new instance of the RemotePrivateEndpointConnection - /// class. - /// - public RemotePrivateEndpointConnection() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RemotePrivateEndpointConnection - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// PrivateEndpoint of a remote private - /// endpoint connection - /// Private IPAddresses mapped to the remote - /// private endpoint - public RemotePrivateEndpointConnection(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState), IList ipAddresses = default(IList)) - : base(id, name, kind, type) - { - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - IpAddresses = ipAddresses; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets privateEndpoint of a remote private endpoint - /// connection - /// - [JsonProperty(PropertyName = "properties.privateEndpoint")] - public ArmIdWrapper PrivateEndpoint { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] - public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } - - /// - /// Gets or sets private IPAddresses mapped to the remote private - /// endpoint - /// - [JsonProperty(PropertyName = "properties.ipAddresses")] - public IList IpAddresses { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs deleted file mode 100644 index 0d506eacfa07..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RemotePrivateEndpointConnectionARMResource.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Remote Private Endpoint Connection ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class RemotePrivateEndpointConnectionARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// RemotePrivateEndpointConnectionARMResource class. - /// - public RemotePrivateEndpointConnectionARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// RemotePrivateEndpointConnectionARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// PrivateEndpoint of a remote private - /// endpoint connection - /// Private IPAddresses mapped to the remote - /// private endpoint - public RemotePrivateEndpointConnectionARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provisioningState = default(string), ArmIdWrapper privateEndpoint = default(ArmIdWrapper), PrivateLinkConnectionState privateLinkServiceConnectionState = default(PrivateLinkConnectionState), IList ipAddresses = default(IList)) - : base(id, name, kind, type) - { - ProvisioningState = provisioningState; - PrivateEndpoint = privateEndpoint; - PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; - IpAddresses = ipAddresses; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets or sets privateEndpoint of a remote private endpoint - /// connection - /// - [JsonProperty(PropertyName = "properties.privateEndpoint")] - public ArmIdWrapper PrivateEndpoint { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.privateLinkServiceConnectionState")] - public PrivateLinkConnectionState PrivateLinkServiceConnectionState { get; set; } - - /// - /// Gets or sets private IPAddresses mapped to the remote private - /// endpoint - /// - [JsonProperty(PropertyName = "properties.ipAddresses")] - public IList IpAddresses { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs deleted file mode 100644 index b9628aacb6f1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Rendering.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Instructions for rendering the data - /// - public partial class Rendering - { - /// - /// Initializes a new instance of the Rendering class. - /// - public Rendering() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Rendering class. - /// - /// Rendering Type. Possible values include: - /// 'NoGraph', 'Table', 'TimeSeries', 'TimeSeriesPerInstance', - /// 'PieChart', 'DataSummary', 'Email', 'Insights', 'DynamicInsight', - /// 'Markdown', 'Detector', 'DropDown', 'Card', 'Solution', 'Guage', - /// 'Form', 'ChangeSets', 'ChangeAnalysisOnboarding', 'ChangesView', - /// 'AppInsight', 'DependencyGraph', 'DownTime', 'SummaryCard', - /// 'SearchComponent', 'AppInsightEnablement' - /// Title of data - /// Description of the data that will help it - /// be interpreted - public Rendering(RenderingType? type = default(RenderingType?), string title = default(string), string description = default(string)) - { - Type = type; - Title = title; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets rendering Type. Possible values include: 'NoGraph', - /// 'Table', 'TimeSeries', 'TimeSeriesPerInstance', 'PieChart', - /// 'DataSummary', 'Email', 'Insights', 'DynamicInsight', 'Markdown', - /// 'Detector', 'DropDown', 'Card', 'Solution', 'Guage', 'Form', - /// 'ChangeSets', 'ChangeAnalysisOnboarding', 'ChangesView', - /// 'AppInsight', 'DependencyGraph', 'DownTime', 'SummaryCard', - /// 'SearchComponent', 'AppInsightEnablement' - /// - [JsonProperty(PropertyName = "type")] - public RenderingType? Type { get; set; } - - /// - /// Gets or sets title of data - /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } - - /// - /// Gets or sets description of the data that will help it be - /// interpreted - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs deleted file mode 100644 index 727d7df75757..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenderingType.cs +++ /dev/null @@ -1,198 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for RenderingType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum RenderingType - { - [EnumMember(Value = "NoGraph")] - NoGraph, - [EnumMember(Value = "Table")] - Table, - [EnumMember(Value = "TimeSeries")] - TimeSeries, - [EnumMember(Value = "TimeSeriesPerInstance")] - TimeSeriesPerInstance, - [EnumMember(Value = "PieChart")] - PieChart, - [EnumMember(Value = "DataSummary")] - DataSummary, - [EnumMember(Value = "Email")] - Email, - [EnumMember(Value = "Insights")] - Insights, - [EnumMember(Value = "DynamicInsight")] - DynamicInsight, - [EnumMember(Value = "Markdown")] - Markdown, - [EnumMember(Value = "Detector")] - Detector, - [EnumMember(Value = "DropDown")] - DropDown, - [EnumMember(Value = "Card")] - Card, - [EnumMember(Value = "Solution")] - Solution, - [EnumMember(Value = "Guage")] - Guage, - [EnumMember(Value = "Form")] - Form, - [EnumMember(Value = "ChangeSets")] - ChangeSets, - [EnumMember(Value = "ChangeAnalysisOnboarding")] - ChangeAnalysisOnboarding, - [EnumMember(Value = "ChangesView")] - ChangesView, - [EnumMember(Value = "AppInsight")] - AppInsight, - [EnumMember(Value = "DependencyGraph")] - DependencyGraph, - [EnumMember(Value = "DownTime")] - DownTime, - [EnumMember(Value = "SummaryCard")] - SummaryCard, - [EnumMember(Value = "SearchComponent")] - SearchComponent, - [EnumMember(Value = "AppInsightEnablement")] - AppInsightEnablement - } - internal static class RenderingTypeEnumExtension - { - internal static string ToSerializedValue(this RenderingType? value) - { - return value == null ? null : ((RenderingType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this RenderingType value) - { - switch( value ) - { - case RenderingType.NoGraph: - return "NoGraph"; - case RenderingType.Table: - return "Table"; - case RenderingType.TimeSeries: - return "TimeSeries"; - case RenderingType.TimeSeriesPerInstance: - return "TimeSeriesPerInstance"; - case RenderingType.PieChart: - return "PieChart"; - case RenderingType.DataSummary: - return "DataSummary"; - case RenderingType.Email: - return "Email"; - case RenderingType.Insights: - return "Insights"; - case RenderingType.DynamicInsight: - return "DynamicInsight"; - case RenderingType.Markdown: - return "Markdown"; - case RenderingType.Detector: - return "Detector"; - case RenderingType.DropDown: - return "DropDown"; - case RenderingType.Card: - return "Card"; - case RenderingType.Solution: - return "Solution"; - case RenderingType.Guage: - return "Guage"; - case RenderingType.Form: - return "Form"; - case RenderingType.ChangeSets: - return "ChangeSets"; - case RenderingType.ChangeAnalysisOnboarding: - return "ChangeAnalysisOnboarding"; - case RenderingType.ChangesView: - return "ChangesView"; - case RenderingType.AppInsight: - return "AppInsight"; - case RenderingType.DependencyGraph: - return "DependencyGraph"; - case RenderingType.DownTime: - return "DownTime"; - case RenderingType.SummaryCard: - return "SummaryCard"; - case RenderingType.SearchComponent: - return "SearchComponent"; - case RenderingType.AppInsightEnablement: - return "AppInsightEnablement"; - } - return null; - } - - internal static RenderingType? ParseRenderingType(this string value) - { - switch( value ) - { - case "NoGraph": - return RenderingType.NoGraph; - case "Table": - return RenderingType.Table; - case "TimeSeries": - return RenderingType.TimeSeries; - case "TimeSeriesPerInstance": - return RenderingType.TimeSeriesPerInstance; - case "PieChart": - return RenderingType.PieChart; - case "DataSummary": - return RenderingType.DataSummary; - case "Email": - return RenderingType.Email; - case "Insights": - return RenderingType.Insights; - case "DynamicInsight": - return RenderingType.DynamicInsight; - case "Markdown": - return RenderingType.Markdown; - case "Detector": - return RenderingType.Detector; - case "DropDown": - return RenderingType.DropDown; - case "Card": - return RenderingType.Card; - case "Solution": - return RenderingType.Solution; - case "Guage": - return RenderingType.Guage; - case "Form": - return RenderingType.Form; - case "ChangeSets": - return RenderingType.ChangeSets; - case "ChangeAnalysisOnboarding": - return RenderingType.ChangeAnalysisOnboarding; - case "ChangesView": - return RenderingType.ChangesView; - case "AppInsight": - return RenderingType.AppInsight; - case "DependencyGraph": - return RenderingType.DependencyGraph; - case "DownTime": - return RenderingType.DownTime; - case "SummaryCard": - return RenderingType.SummaryCard; - case "SearchComponent": - return RenderingType.SearchComponent; - case "AppInsightEnablement": - return RenderingType.AppInsightEnablement; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenewCertificateOrderRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenewCertificateOrderRequest.cs deleted file mode 100644 index cdd22b65c909..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RenewCertificateOrderRequest.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Class representing certificate renew request. - /// - [Rest.Serialization.JsonTransformation] - public partial class RenewCertificateOrderRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the RenewCertificateOrderRequest - /// class. - /// - public RenewCertificateOrderRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RenewCertificateOrderRequest - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Certificate Key Size. - /// Csr to be used for re-key operation. - /// Should we change the ASC type - /// (from managed private key to external private key and vice - /// versa). - public RenewCertificateOrderRequest(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? keySize = default(int?), string csr = default(string), bool? isPrivateKeyExternal = default(bool?)) - : base(id, name, kind, type) - { - KeySize = keySize; - Csr = csr; - IsPrivateKeyExternal = isPrivateKeyExternal; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets certificate Key Size. - /// - [JsonProperty(PropertyName = "properties.keySize")] - public int? KeySize { get; set; } - - /// - /// Gets or sets csr to be used for re-key operation. - /// - [JsonProperty(PropertyName = "properties.csr")] - public string Csr { get; set; } - - /// - /// Gets or sets should we change the ASC type (from managed private - /// key to external private key and vice versa). - /// - [JsonProperty(PropertyName = "properties.isPrivateKeyExternal")] - public bool? IsPrivateKeyExternal { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RequestsBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RequestsBasedTrigger.cs deleted file mode 100644 index d96750f47c95..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RequestsBasedTrigger.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Trigger based on total requests. - /// - public partial class RequestsBasedTrigger - { - /// - /// Initializes a new instance of the RequestsBasedTrigger class. - /// - public RequestsBasedTrigger() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RequestsBasedTrigger class. - /// - /// Request Count. - /// Time interval. - public RequestsBasedTrigger(int? count = default(int?), string timeInterval = default(string)) - { - Count = count; - TimeInterval = timeInterval; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets request Count. - /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - - /// - /// Gets or sets time interval. - /// - [JsonProperty(PropertyName = "timeInterval")] - public string TimeInterval { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs deleted file mode 100644 index a83588884f36..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResolveStatus.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for ResolveStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ResolveStatus - { - [EnumMember(Value = "Initialized")] - Initialized, - [EnumMember(Value = "Resolved")] - Resolved, - [EnumMember(Value = "InvalidSyntax")] - InvalidSyntax, - [EnumMember(Value = "MSINotEnabled")] - MSINotEnabled, - [EnumMember(Value = "VaultNotFound")] - VaultNotFound, - [EnumMember(Value = "SecretNotFound")] - SecretNotFound, - [EnumMember(Value = "SecretVersionNotFound")] - SecretVersionNotFound, - [EnumMember(Value = "AccessToKeyVaultDenied")] - AccessToKeyVaultDenied, - [EnumMember(Value = "OtherReasons")] - OtherReasons, - [EnumMember(Value = "FetchTimedOut")] - FetchTimedOut, - [EnumMember(Value = "UnauthorizedClient")] - UnauthorizedClient - } - internal static class ResolveStatusEnumExtension - { - internal static string ToSerializedValue(this ResolveStatus? value) - { - return value == null ? null : ((ResolveStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this ResolveStatus value) - { - switch( value ) - { - case ResolveStatus.Initialized: - return "Initialized"; - case ResolveStatus.Resolved: - return "Resolved"; - case ResolveStatus.InvalidSyntax: - return "InvalidSyntax"; - case ResolveStatus.MSINotEnabled: - return "MSINotEnabled"; - case ResolveStatus.VaultNotFound: - return "VaultNotFound"; - case ResolveStatus.SecretNotFound: - return "SecretNotFound"; - case ResolveStatus.SecretVersionNotFound: - return "SecretVersionNotFound"; - case ResolveStatus.AccessToKeyVaultDenied: - return "AccessToKeyVaultDenied"; - case ResolveStatus.OtherReasons: - return "OtherReasons"; - case ResolveStatus.FetchTimedOut: - return "FetchTimedOut"; - case ResolveStatus.UnauthorizedClient: - return "UnauthorizedClient"; - } - return null; - } - - internal static ResolveStatus? ParseResolveStatus(this string value) - { - switch( value ) - { - case "Initialized": - return ResolveStatus.Initialized; - case "Resolved": - return ResolveStatus.Resolved; - case "InvalidSyntax": - return ResolveStatus.InvalidSyntax; - case "MSINotEnabled": - return ResolveStatus.MSINotEnabled; - case "VaultNotFound": - return ResolveStatus.VaultNotFound; - case "SecretNotFound": - return ResolveStatus.SecretNotFound; - case "SecretVersionNotFound": - return ResolveStatus.SecretVersionNotFound; - case "AccessToKeyVaultDenied": - return ResolveStatus.AccessToKeyVaultDenied; - case "OtherReasons": - return ResolveStatus.OtherReasons; - case "FetchTimedOut": - return ResolveStatus.FetchTimedOut; - case "UnauthorizedClient": - return ResolveStatus.UnauthorizedClient; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Resource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Resource.cs deleted file mode 100644 index b9afb2fc04f6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Resource.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Azure resource. This resource is tracked in Azure Resource Manager - /// - 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 Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - public Resource(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary)) - { - Id = id; - Name = name; - Kind = kind; - Location = location; - 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 or sets kind of resource. - /// - [JsonProperty(PropertyName = "kind")] - public string Kind { get; set; } - - /// - /// Gets or sets resource Location. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets resource type. - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - /// - /// Gets or sets resource tags. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceHealthMetadata.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceHealthMetadata.cs deleted file mode 100644 index d27a122a6915..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceHealthMetadata.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Used for getting ResourceHealthCheck settings. - /// - [Rest.Serialization.JsonTransformation] - public partial class ResourceHealthMetadata : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ResourceHealthMetadata class. - /// - public ResourceHealthMetadata() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceHealthMetadata class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The category that the resource matches in - /// the RHC Policy File - /// Is there a health signal for the - /// resource - public ResourceHealthMetadata(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string category = default(string), bool? signalAvailability = default(bool?)) - : base(id, name, kind, type) - { - Category = category; - SignalAvailability = signalAvailability; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the category that the resource matches in the RHC - /// Policy File - /// - [JsonProperty(PropertyName = "properties.category")] - public string Category { get; set; } - - /// - /// Gets or sets is there a health signal for the resource - /// - [JsonProperty(PropertyName = "properties.signalAvailability")] - public bool? SignalAvailability { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricAvailability.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricAvailability.cs deleted file mode 100644 index 6a258b8f67f0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricAvailability.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Metrics availability and retention. - /// - public partial class ResourceMetricAvailability - { - /// - /// Initializes a new instance of the ResourceMetricAvailability class. - /// - public ResourceMetricAvailability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceMetricAvailability class. - /// - /// Time grain . - /// Retention period for the current time - /// grain. - public ResourceMetricAvailability(string timeGrain = default(string), string retention = default(string)) - { - TimeGrain = timeGrain; - Retention = retention; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets time grain . - /// - [JsonProperty(PropertyName = "timeGrain")] - public string TimeGrain { get; private set; } - - /// - /// Gets retention period for the current time grain. - /// - [JsonProperty(PropertyName = "retention")] - public string Retention { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricDefinition.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricDefinition.cs deleted file mode 100644 index 022529f87010..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceMetricDefinition.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Metadata for the metrics. - /// - [Rest.Serialization.JsonTransformation] - public partial class ResourceMetricDefinition : ProxyOnlyResource - { - /// - /// Initializes a new instance of the ResourceMetricDefinition class. - /// - public ResourceMetricDefinition() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceMetricDefinition class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Unit of the metric. - /// Primary aggregation - /// type. - /// List of time grains supported - /// for the metric together with retention period. - /// Resource URI. - /// Resource metric definition - /// properties. - public ResourceMetricDefinition(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string unit = default(string), string primaryAggregationType = default(string), IList metricAvailabilities = default(IList), string resourceUri = default(string), IDictionary properties = default(IDictionary)) - : base(id, name, kind, type) - { - Unit = unit; - PrimaryAggregationType = primaryAggregationType; - MetricAvailabilities = metricAvailabilities; - ResourceUri = resourceUri; - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets unit of the metric. - /// - [JsonProperty(PropertyName = "properties.unit")] - public string Unit { get; private set; } - - /// - /// Gets primary aggregation type. - /// - [JsonProperty(PropertyName = "properties.primaryAggregationType")] - public string PrimaryAggregationType { get; private set; } - - /// - /// Gets list of time grains supported for the metric together with - /// retention period. - /// - [JsonProperty(PropertyName = "properties.metricAvailabilities")] - public IList MetricAvailabilities { get; private set; } - - /// - /// Gets resource URI. - /// - [JsonProperty(PropertyName = "properties.resourceUri")] - public string ResourceUri { get; private set; } - - /// - /// Gets resource metric definition properties. - /// - [JsonProperty(PropertyName = "properties.properties")] - public IDictionary Properties { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailability.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailability.cs deleted file mode 100644 index c199116b2ea1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailability.cs +++ /dev/null @@ -1,89 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Information regarding availability of a resource name. - /// - public partial class ResourceNameAvailability - { - /// - /// Initializes a new instance of the ResourceNameAvailability class. - /// - public ResourceNameAvailability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceNameAvailability class. - /// - /// <code>true</code> indicates - /// name is valid and available. <code>false</code> - /// indicates the name is invalid, unavailable, or both. - /// <code>Invalid</code> indicates the - /// name provided does not match Azure App Service naming requirements. - /// <code>AlreadyExists</code> indicates that the name is - /// already in use and is therefore unavailable. Possible values - /// include: 'Invalid', 'AlreadyExists' - /// 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 resource name is already in - /// use, and direct them to select a different name. - public ResourceNameAvailability(bool? nameAvailable = default(bool?), string reason = default(string), string message = default(string)) - { - NameAvailable = nameAvailable; - Reason = reason; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; - /// indicates name is valid and available. - /// &lt;code&gt;false&lt;/code&gt; indicates the name - /// is invalid, unavailable, or both. - /// - [JsonProperty(PropertyName = "nameAvailable")] - public bool? NameAvailable { get; set; } - - /// - /// Gets or sets &lt;code&gt;Invalid&lt;/code&gt; - /// indicates the name provided does not match Azure App Service naming - /// requirements. - /// &lt;code&gt;AlreadyExists&lt;/code&gt; indicates - /// that the name is already in use and is therefore unavailable. - /// Possible values include: 'Invalid', 'AlreadyExists' - /// - [JsonProperty(PropertyName = "reason")] - public string Reason { get; set; } - - /// - /// Gets or sets 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 resource name is already in use, and - /// direct them to select a different name. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailabilityRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailabilityRequest.cs deleted file mode 100644 index 7269a0be5826..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceNameAvailabilityRequest.cs +++ /dev/null @@ -1,95 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resource name availability request content. - /// - public partial class ResourceNameAvailabilityRequest - { - /// - /// Initializes a new instance of the ResourceNameAvailabilityRequest - /// class. - /// - public ResourceNameAvailabilityRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResourceNameAvailabilityRequest - /// class. - /// - /// Resource name to verify. - /// Resource type used for verification. Possible - /// values include: 'Site', 'Slot', 'HostingEnvironment', - /// 'PublishingUser', 'Microsoft.Web/sites', - /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// Is fully qualified domain name. - public ResourceNameAvailabilityRequest(string name, string type, bool? isFqdn = default(bool?)) - { - Name = name; - Type = type; - IsFqdn = isFqdn; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource name to verify. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets resource type used for verification. Possible values - /// include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', - /// 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', - /// 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets is fully qualified domain name. - /// - [JsonProperty(PropertyName = "isFqdn")] - public bool? IsFqdn { 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/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceScopeType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceScopeType.cs deleted file mode 100644 index 42cd0d7da6b8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResourceScopeType.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for ResourceScopeType. - /// - public static class ResourceScopeType - { - public const string ServerFarm = "ServerFarm"; - public const string Subscription = "Subscription"; - public const string WebSite = "WebSite"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs deleted file mode 100644 index 9626aeccc566..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMessageEnvelopeRemotePrivateEndpointConnection.cs +++ /dev/null @@ -1,158 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Message envelope that contains the common Azure resource manager - /// properties and the resource provider specific content. - /// - public partial class ResponseMessageEnvelopeRemotePrivateEndpointConnection - { - /// - /// Initializes a new instance of the - /// ResponseMessageEnvelopeRemotePrivateEndpointConnection class. - /// - public ResponseMessageEnvelopeRemotePrivateEndpointConnection() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// ResponseMessageEnvelopeRemotePrivateEndpointConnection class. - /// - /// Resource Id. Typically ID is populated only for - /// responses to GET requests. Caller is responsible for passing in - /// this - /// value for GET requests only. - /// For example: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} - /// Name of resource. - /// Type of resource e.g - /// "Microsoft.Web/sites". - /// Geographical region resource belongs to e.g. - /// SouthCentralUS, SouthEastAsia. - /// Tags associated with resource. - /// Azure resource manager plan. - /// Resource specific properties. - /// SKU description of the resource. - /// Azure-AsyncOperation Status info. - /// Azure-AsyncOperation Error info. - /// MSI resource - /// Logical Availability Zones the service is - /// hosted in - public ResponseMessageEnvelopeRemotePrivateEndpointConnection(string id = default(string), string name = default(string), string type = default(string), string location = default(string), IDictionary tags = default(IDictionary), ArmPlan plan = default(ArmPlan), RemotePrivateEndpointConnection properties = default(RemotePrivateEndpointConnection), SkuDescription sku = default(SkuDescription), string status = default(string), ErrorEntity error = default(ErrorEntity), ManagedServiceIdentity identity = default(ManagedServiceIdentity), IList zones = default(IList)) - { - Id = id; - Name = name; - Type = type; - Location = location; - Tags = tags; - Plan = plan; - Properties = properties; - Sku = sku; - Status = status; - Error = error; - Identity = identity; - Zones = zones; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource Id. Typically ID is populated only for - /// responses to GET requests. Caller is responsible for passing in - /// this - /// value for GET requests only. - /// For example: - /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Web/sites/{sitename} - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets or sets name of resource. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets type of resource e.g "Microsoft.Web/sites". - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets geographical region resource belongs to e.g. - /// SouthCentralUS, SouthEastAsia. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets tags associated with resource. - /// - [JsonProperty(PropertyName = "tags")] - public IDictionary Tags { get; set; } - - /// - /// Gets or sets azure resource manager plan. - /// - [JsonProperty(PropertyName = "plan")] - public ArmPlan Plan { get; set; } - - /// - /// Gets or sets resource specific properties. - /// - [JsonProperty(PropertyName = "properties")] - public RemotePrivateEndpointConnection Properties { get; set; } - - /// - /// Gets or sets SKU description of the resource. - /// - [JsonProperty(PropertyName = "sku")] - public SkuDescription Sku { get; set; } - - /// - /// Gets or sets azure-AsyncOperation Status info. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - /// - /// Gets or sets azure-AsyncOperation Error info. - /// - [JsonProperty(PropertyName = "error")] - public ErrorEntity Error { get; set; } - - /// - /// Gets or sets MSI resource - /// - [JsonProperty(PropertyName = "identity")] - public ManagedServiceIdentity Identity { get; set; } - - /// - /// Gets or sets logical Availability Zones the service is hosted in - /// - [JsonProperty(PropertyName = "zones")] - public IList Zones { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMetaData.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMetaData.cs deleted file mode 100644 index e8846b26ab8c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ResponseMetaData.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - public partial class ResponseMetaData - { - /// - /// Initializes a new instance of the ResponseMetaData class. - /// - public ResponseMetaData() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ResponseMetaData class. - /// - /// Source of the Data - public ResponseMetaData(DataSource dataSource = default(DataSource)) - { - DataSource = dataSource; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets source of the Data - /// - [JsonProperty(PropertyName = "dataSource")] - public DataSource DataSource { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RestoreRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RestoreRequest.cs deleted file mode 100644 index 7f9f46f4791e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RestoreRequest.cs +++ /dev/null @@ -1,198 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of a restore request. - /// - [Rest.Serialization.JsonTransformation] - public partial class RestoreRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the RestoreRequest class. - /// - public RestoreRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the RestoreRequest class. - /// - /// SAS URL to the container. - /// <code>true</code> if the - /// restore operation can overwrite target app; otherwise, - /// <code>false</code>. <code>true</code> is - /// needed if trying to restore over an existing app. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Name of a blob which contains the - /// backup. - /// Name of an app. - /// Collection of databases which should be - /// restored. This list has to match the list of databases included in - /// the backup. - /// Changes a logic when - /// restoring an app with custom domains. <code>true</code> - /// to remove custom domains automatically. If - /// <code>false</code>, custom domains are added to - /// the app's object when it is being restored, but that might fail due - /// to conflicts during the operation. - /// Ignore the databases and only restore - /// the site content - /// Specify app service plan that will own - /// restored site. - /// Operation type. Possible values - /// include: 'Default', 'Clone', 'Relocation', 'Snapshot', - /// 'CloudFS' - /// <code>true</code> - /// if SiteConfig.ConnectionStrings should be set in new app; - /// otherwise, <code>false</code>. - /// App Service Environment name, if - /// needed (only when restoring an app to an App Service - /// Environment). - public RestoreRequest(string storageAccountUrl, bool overwrite, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string blobName = default(string), string siteName = default(string), IList databases = default(IList), bool? ignoreConflictingHostNames = default(bool?), bool? ignoreDatabases = default(bool?), string appServicePlan = default(string), BackupRestoreOperationType? operationType = default(BackupRestoreOperationType?), bool? adjustConnectionStrings = default(bool?), string hostingEnvironment = default(string)) - : base(id, name, kind, type) - { - StorageAccountUrl = storageAccountUrl; - BlobName = blobName; - Overwrite = overwrite; - SiteName = siteName; - Databases = databases; - IgnoreConflictingHostNames = ignoreConflictingHostNames; - IgnoreDatabases = ignoreDatabases; - AppServicePlan = appServicePlan; - OperationType = operationType; - AdjustConnectionStrings = adjustConnectionStrings; - HostingEnvironment = hostingEnvironment; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets SAS URL to the container. - /// - [JsonProperty(PropertyName = "properties.storageAccountUrl")] - public string StorageAccountUrl { get; set; } - - /// - /// Gets or sets name of a blob which contains the backup. - /// - [JsonProperty(PropertyName = "properties.blobName")] - public string BlobName { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// restore operation can overwrite target app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// &lt;code&gt;true&lt;/code&gt; is needed if trying - /// to restore over an existing app. - /// - [JsonProperty(PropertyName = "properties.overwrite")] - public bool Overwrite { get; set; } - - /// - /// Gets or sets name of an app. - /// - [JsonProperty(PropertyName = "properties.siteName")] - public string SiteName { get; set; } - - /// - /// Gets or sets collection of databases which should be restored. This - /// list has to match the list of databases included in the backup. - /// - [JsonProperty(PropertyName = "properties.databases")] - public IList Databases { get; set; } - - /// - /// Gets or sets changes a logic when restoring an app with custom - /// domains. &lt;code&gt;true&lt;/code&gt; to remove - /// custom domains automatically. If - /// &lt;code&gt;false&lt;/code&gt;, custom domains are - /// added to - /// the app's object when it is being restored, but that might fail due - /// to conflicts during the operation. - /// - [JsonProperty(PropertyName = "properties.ignoreConflictingHostNames")] - public bool? IgnoreConflictingHostNames { get; set; } - - /// - /// Gets or sets ignore the databases and only restore the site content - /// - [JsonProperty(PropertyName = "properties.ignoreDatabases")] - public bool? IgnoreDatabases { get; set; } - - /// - /// Gets or sets specify app service plan that will own restored site. - /// - [JsonProperty(PropertyName = "properties.appServicePlan")] - public string AppServicePlan { get; set; } - - /// - /// Gets or sets operation type. Possible values include: 'Default', - /// 'Clone', 'Relocation', 'Snapshot', 'CloudFS' - /// - [JsonProperty(PropertyName = "properties.operationType")] - public BackupRestoreOperationType? OperationType { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// SiteConfig.ConnectionStrings should be set in new app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.adjustConnectionStrings")] - public bool? AdjustConnectionStrings { get; set; } - - /// - /// Gets or sets app Service Environment name, if needed (only when - /// restoring an app to an App Service Environment). - /// - [JsonProperty(PropertyName = "properties.hostingEnvironment")] - public string HostingEnvironment { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (StorageAccountUrl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "StorageAccountUrl"); - } - if (Databases != null) - { - foreach (var element in Databases) - { - if (element != null) - { - element.Validate(); - } - } - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs deleted file mode 100644 index 839721b59b92..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Revision.cs +++ /dev/null @@ -1,157 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App Revision. - /// - [Rest.Serialization.JsonTransformation] - public partial class Revision : Resource - { - /// - /// Initializes a new instance of the Revision class. - /// - public Revision() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Revision class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Timestamp describing when the revision - /// was created - /// by controller - /// Fully qualified domain name of the - /// revision - /// Container App Revision Template with all - /// possible settings and the - /// defaults if user did not provide them. The defaults are populated - /// as they were at the creation time - /// Boolean describing if the Revision is - /// Active - /// Number of pods currently running for this - /// revision - /// Traffic weight assigned to this - /// revision - /// Optional Field - Platform Error - /// Message - /// Current health State of the revision. - /// Possible values include: 'Healthy', 'Unhealthy', 'None' - /// Current provisioning State of the - /// revision. Possible values include: 'Provisioning', 'Provisioned', - /// 'Failed', 'Deprovisioning', 'Deprovisioned' - public Revision(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), System.DateTime? createdTime = default(System.DateTime?), string fqdn = default(string), Template template = default(Template), bool? active = default(bool?), int? replicas = default(int?), int? trafficWeight = default(int?), string provisioningError = default(string), string healthState = default(string), string provisioningState = default(string)) - : base(location, id, name, kind, type, tags) - { - CreatedTime = createdTime; - Fqdn = fqdn; - Template = template; - Active = active; - Replicas = replicas; - TrafficWeight = trafficWeight; - ProvisioningError = provisioningError; - HealthState = healthState; - ProvisioningState = provisioningState; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets timestamp describing when the revision was created - /// by controller - /// - [JsonProperty(PropertyName = "properties.createdTime")] - public System.DateTime? CreatedTime { get; private set; } - - /// - /// Gets fully qualified domain name of the revision - /// - [JsonProperty(PropertyName = "properties.fqdn")] - public string Fqdn { get; private set; } - - /// - /// Gets container App Revision Template with all possible settings and - /// the - /// defaults if user did not provide them. The defaults are populated - /// as they were at the creation time - /// - [JsonProperty(PropertyName = "properties.template")] - public Template Template { get; private set; } - - /// - /// Gets boolean describing if the Revision is Active - /// - [JsonProperty(PropertyName = "properties.active")] - public bool? Active { get; private set; } - - /// - /// Gets number of pods currently running for this revision - /// - [JsonProperty(PropertyName = "properties.replicas")] - public int? Replicas { get; private set; } - - /// - /// Gets traffic weight assigned to this revision - /// - [JsonProperty(PropertyName = "properties.trafficWeight")] - public int? TrafficWeight { get; private set; } - - /// - /// Gets optional Field - Platform Error Message - /// - [JsonProperty(PropertyName = "properties.provisioningError")] - public string ProvisioningError { get; private set; } - - /// - /// Gets current health State of the revision. Possible values include: - /// 'Healthy', 'Unhealthy', 'None' - /// - [JsonProperty(PropertyName = "properties.healthState")] - public string HealthState { get; private set; } - - /// - /// Gets current provisioning State of the revision. Possible values - /// include: 'Provisioning', 'Provisioned', 'Failed', 'Deprovisioning', - /// 'Deprovisioned' - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs deleted file mode 100644 index cff421706e54..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionHealthState.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for RevisionHealthState. - /// - public static class RevisionHealthState - { - public const string Healthy = "Healthy"; - public const string Unhealthy = "Unhealthy"; - public const string None = "None"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs deleted file mode 100644 index 7160dda110bb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RevisionProvisioningState.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for RevisionProvisioningState. - /// - public static class RevisionProvisioningState - { - public const string Provisioning = "Provisioning"; - public const string Provisioned = "Provisioned"; - public const string Failed = "Failed"; - public const string Deprovisioning = "Deprovisioning"; - public const string Deprovisioned = "Deprovisioned"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RouteType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RouteType.cs deleted file mode 100644 index 45453b399b4e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/RouteType.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for RouteType. - /// - public static class RouteType - { - public const string DEFAULT = "DEFAULT"; - public const string INHERITED = "INHERITED"; - public const string STATIC = "STATIC"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs deleted file mode 100644 index f649b929bc22..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SampleUtterance.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Sample utterance. - /// - public partial class SampleUtterance - { - /// - /// Initializes a new instance of the SampleUtterance class. - /// - public SampleUtterance() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SampleUtterance class. - /// - /// Text attribute of sample utterance. - /// Links attribute of sample utterance. - /// Question id of sample utterance (for - /// stackoverflow questions titles). - public SampleUtterance(string text = default(string), IList links = default(IList), string qid = default(string)) - { - Text = text; - Links = links; - Qid = qid; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets text attribute of sample utterance. - /// - [JsonProperty(PropertyName = "text")] - public string Text { get; set; } - - /// - /// Gets or sets links attribute of sample utterance. - /// - [JsonProperty(PropertyName = "links")] - public IList Links { get; set; } - - /// - /// Gets or sets question id of sample utterance (for stackoverflow - /// questions titles). - /// - [JsonProperty(PropertyName = "qid")] - public string Qid { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs deleted file mode 100644 index 38da82012871..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Scale.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App scaling configurations. - /// - public partial class Scale - { - /// - /// Initializes a new instance of the Scale class. - /// - public Scale() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Scale class. - /// - /// Optional. Minimum number of container - /// replicas. - /// Optional. Maximum number of container - /// replicas. Defaults to 10 if not set. - /// Scaling rules. - public Scale(int? minReplicas = default(int?), int? maxReplicas = default(int?), IList rules = default(IList)) - { - MinReplicas = minReplicas; - MaxReplicas = maxReplicas; - Rules = rules; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets optional. Minimum number of container replicas. - /// - [JsonProperty(PropertyName = "minReplicas")] - public int? MinReplicas { get; set; } - - /// - /// Gets or sets optional. Maximum number of container replicas. - /// Defaults to 10 if not set. - /// - [JsonProperty(PropertyName = "maxReplicas")] - public int? MaxReplicas { get; set; } - - /// - /// Gets or sets scaling rules. - /// - [JsonProperty(PropertyName = "rules")] - public IList Rules { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs deleted file mode 100644 index af5c098ac90b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRule.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App container scaling rule. - /// - public partial class ScaleRule - { - /// - /// Initializes a new instance of the ScaleRule class. - /// - public ScaleRule() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ScaleRule class. - /// - /// Scale Rule Name - /// Azure Queue based scaling. - /// Custom scale rule. - /// HTTP requests based scaling. - public ScaleRule(string name = default(string), QueueScaleRule azureQueue = default(QueueScaleRule), CustomScaleRule custom = default(CustomScaleRule), HttpScaleRule http = default(HttpScaleRule)) - { - Name = name; - AzureQueue = azureQueue; - Custom = custom; - Http = http; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets scale Rule Name - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets azure Queue based scaling. - /// - [JsonProperty(PropertyName = "azureQueue")] - public QueueScaleRule AzureQueue { get; set; } - - /// - /// Gets or sets custom scale rule. - /// - [JsonProperty(PropertyName = "custom")] - public CustomScaleRule Custom { get; set; } - - /// - /// Gets or sets HTTP requests based scaling. - /// - [JsonProperty(PropertyName = "http")] - public HttpScaleRule Http { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs deleted file mode 100644 index ad8cc49bd56a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScaleRuleAuth.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Auth Secrets for Container App Scale Rule - /// - public partial class ScaleRuleAuth - { - /// - /// Initializes a new instance of the ScaleRuleAuth class. - /// - public ScaleRuleAuth() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ScaleRuleAuth class. - /// - /// Name of the Container App secret from which - /// to pull the auth params. - /// Trigger Parameter that uses the - /// secret - public ScaleRuleAuth(string secretRef = default(string), string triggerParameter = default(string)) - { - SecretRef = secretRef; - TriggerParameter = triggerParameter; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the Container App secret from which to pull - /// the auth params. - /// - [JsonProperty(PropertyName = "secretRef")] - public string SecretRef { get; set; } - - /// - /// Gets or sets trigger Parameter that uses the secret - /// - [JsonProperty(PropertyName = "triggerParameter")] - public string TriggerParameter { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScmType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScmType.cs deleted file mode 100644 index 20a633dd2b81..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ScmType.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for ScmType. - /// - public static class ScmType - { - public const string None = "None"; - public const string Dropbox = "Dropbox"; - public const string Tfs = "Tfs"; - public const string LocalGit = "LocalGit"; - public const string GitHub = "GitHub"; - public const string CodePlexGit = "CodePlexGit"; - public const string CodePlexHg = "CodePlexHg"; - public const string BitbucketGit = "BitbucketGit"; - public const string BitbucketHg = "BitbucketHg"; - public const string ExternalGit = "ExternalGit"; - public const string ExternalHg = "ExternalHg"; - public const string OneDrive = "OneDrive"; - public const string VSO = "VSO"; - public const string VSTSRM = "VSTSRM"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs deleted file mode 100644 index 9d084b32c274..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Secret.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Container App Secret. - /// - public partial class Secret - { - /// - /// Initializes a new instance of the Secret class. - /// - public Secret() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Secret class. - /// - /// Secret Name. - /// Secret Value. - public Secret(string name = default(string), string value = default(string)) - { - Name = name; - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets secret Name. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets secret Value. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs deleted file mode 100644 index 1d6c2763e619..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SecretsCollection.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App Secrets Collection ARM resource. - /// - public partial class SecretsCollection - { - /// - /// Initializes a new instance of the SecretsCollection class. - /// - public SecretsCollection() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SecretsCollection class. - /// - /// Collection of resources. - public SecretsCollection(IList value) - { - Value = value; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets collection of resources. - /// - [JsonProperty(PropertyName = "value")] - public IList Value { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Value == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Value"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ServiceSpecification.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ServiceSpecification.cs deleted file mode 100644 index 5fa815145211..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ServiceSpecification.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Resource metrics service provided by Microsoft.Insights resource - /// provider. - /// - public partial class ServiceSpecification - { - /// - /// Initializes a new instance of the ServiceSpecification class. - /// - public ServiceSpecification() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ServiceSpecification class. - /// - public ServiceSpecification(IList metricSpecifications = default(IList), IList logSpecifications = default(IList)) - { - MetricSpecifications = metricSpecifications; - LogSpecifications = logSpecifications; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// - [JsonProperty(PropertyName = "metricSpecifications")] - public IList MetricSpecifications { get; set; } - - /// - /// - [JsonProperty(PropertyName = "logSpecifications")] - public IList LogSpecifications { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs deleted file mode 100644 index cda65a55c0cc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Site.cs +++ /dev/null @@ -1,539 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A web app, a mobile app backend, or an API app. - /// - [Rest.Serialization.JsonTransformation] - public partial class Site : Resource - { - /// - /// Initializes a new instance of the Site class. - /// - public Site() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Site class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// Current state of the app. - /// Hostnames associated with the app. - /// Name of the repository - /// site. - /// State indicating whether the app has - /// exceeded its quota usage. Read-only. Possible values include: - /// 'Normal', 'Exceeded' - /// <code>true</code> if the app is - /// enabled; otherwise, <code>false</code>. Setting this - /// value to false disables the app (takes the app offline). - /// Enabled hostnames for the - /// app.Hostnames need to be assigned (see HostNames) AND enabled. - /// Otherwise, - /// the app is not served on those hostnames. - /// Management information availability - /// state for the app. Possible values include: 'Normal', 'Limited', - /// 'DisasterRecoveryMode' - /// Hostname SSL states are used to - /// manage the SSL bindings for app's hostnames. - /// Resource ID of the associated App - /// Service plan, formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// <code>true</code> if reserved; - /// otherwise, <code>false</code>. - /// Obsolete: Hyper-V sandbox. - /// Hyper-V sandbox. - /// Last time the app was modified, - /// in UTC. Read-only. - /// Configuration of the app. - /// Azure Traffic Manager - /// hostnames associated with the app. Read-only. - /// <code>true</code> to - /// stop SCM (KUDU) site when the app is stopped; otherwise, - /// <code>false</code>. The default is - /// <code>false</code>. - /// Specifies which deployment slot this - /// app will swap into. Read-only. - /// App Service Environment to - /// use for the app. - /// <code>true</code> - /// to enable client affinity; <code>false</code> to stop - /// sending session affinity cookies, which route client requests in - /// the same session to the same instance. Default is - /// <code>true</code>. - /// <code>true</code> to - /// enable client certificate authentication (TLS mutual - /// authentication); otherwise, <code>false</code>. Default - /// is <code>false</code>. - /// This composes with ClientCertEnabled - /// setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means - /// ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means - /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional', 'OptionalInteractiveUser' - /// client certificate - /// authentication comma-separated exclusion paths - /// <code>true</code> to - /// disable the public hostnames of the app; otherwise, - /// <code>false</code>. - /// If <code>true</code>, the app is only accessible via - /// API management process. - /// Unique identifier that - /// verifies the custom domains assigned to the app. Customer will add - /// this id to a txt record for verification. - /// List of IP addresses that the app - /// uses for outbound connections (e.g. database access). Includes VIPs - /// from tenants that site can be hosted with current settings. - /// Read-only. - /// List of IP addresses that - /// the app uses for outbound connections (e.g. database access). - /// Includes VIPs from all tenants except dataComponent. - /// Read-only. - /// Size of the function container. - /// Maximum allowed daily - /// memory-time quota (applicable on dynamic apps only). - /// App suspended till in case memory-time - /// quota is exceeded. - /// Maximum number of workers. - /// This only applies to Functions container. - /// If specified during app creation, the app - /// is cloned from a source app. - /// Name of the resource group the app - /// belongs to. Read-only. - /// <code>true</code> if - /// the app is a default container; otherwise, - /// <code>false</code>. - /// Default hostname of the app. - /// Read-only. - /// Status of the last deployment slot - /// swap operation. - /// HttpsOnly: configures a web site to accept - /// only https requests. Issues redirect for - /// http requests - /// Site redundancy mode. Possible values - /// include: 'None', 'Manual', 'Failover', 'ActiveActive', - /// 'GeoRedundant' - /// Specifies an operation id if - /// this site has a pending operation. - /// Checks if Customer provided - /// storage account is required - /// Identity to use for Key - /// Vault Reference authentication. - /// Azure Resource Manager ID of - /// the Virtual network and subnet to be joined by Regional VNET - /// Integration. - /// This must be of the form - /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - public Site(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity), ExtendedLocation extendedLocation = default(ExtendedLocation)) - : base(location, id, name, kind, type, tags) - { - State = state; - HostNames = hostNames; - RepositorySiteName = repositorySiteName; - UsageState = usageState; - Enabled = enabled; - EnabledHostNames = enabledHostNames; - AvailabilityState = availabilityState; - HostNameSslStates = hostNameSslStates; - ServerFarmId = serverFarmId; - Reserved = reserved; - IsXenon = isXenon; - HyperV = hyperV; - LastModifiedTimeUtc = lastModifiedTimeUtc; - SiteConfig = siteConfig; - TrafficManagerHostNames = trafficManagerHostNames; - ScmSiteAlsoStopped = scmSiteAlsoStopped; - TargetSwapSlot = targetSwapSlot; - HostingEnvironmentProfile = hostingEnvironmentProfile; - ClientAffinityEnabled = clientAffinityEnabled; - ClientCertEnabled = clientCertEnabled; - ClientCertMode = clientCertMode; - ClientCertExclusionPaths = clientCertExclusionPaths; - HostNamesDisabled = hostNamesDisabled; - CustomDomainVerificationId = customDomainVerificationId; - OutboundIpAddresses = outboundIpAddresses; - PossibleOutboundIpAddresses = possibleOutboundIpAddresses; - ContainerSize = containerSize; - DailyMemoryTimeQuota = dailyMemoryTimeQuota; - SuspendedTill = suspendedTill; - MaxNumberOfWorkers = maxNumberOfWorkers; - CloningInfo = cloningInfo; - ResourceGroup = resourceGroup; - IsDefaultContainer = isDefaultContainer; - DefaultHostName = defaultHostName; - SlotSwapStatus = slotSwapStatus; - HttpsOnly = httpsOnly; - RedundancyMode = redundancyMode; - InProgressOperationId = inProgressOperationId; - StorageAccountRequired = storageAccountRequired; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - VirtualNetworkSubnetId = virtualNetworkSubnetId; - Identity = identity; - ExtendedLocation = extendedLocation; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets current state of the app. - /// - [JsonProperty(PropertyName = "properties.state")] - public string State { get; private set; } - - /// - /// Gets hostnames associated with the app. - /// - [JsonProperty(PropertyName = "properties.hostNames")] - public IList HostNames { get; private set; } - - /// - /// Gets name of the repository site. - /// - [JsonProperty(PropertyName = "properties.repositorySiteName")] - public string RepositorySiteName { get; private set; } - - /// - /// Gets state indicating whether the app has exceeded its quota usage. - /// Read-only. Possible values include: 'Normal', 'Exceeded' - /// - [JsonProperty(PropertyName = "properties.usageState")] - public UsageState? UsageState { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// app is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. Setting this value - /// to false disables the app (takes the app offline). - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets enabled hostnames for the app.Hostnames need to be assigned - /// (see HostNames) AND enabled. Otherwise, - /// the app is not served on those hostnames. - /// - [JsonProperty(PropertyName = "properties.enabledHostNames")] - public IList EnabledHostNames { get; private set; } - - /// - /// Gets management information availability state for the app. - /// Possible values include: 'Normal', 'Limited', - /// 'DisasterRecoveryMode' - /// - [JsonProperty(PropertyName = "properties.availabilityState")] - public SiteAvailabilityState? AvailabilityState { get; private set; } - - /// - /// Gets or sets hostname SSL states are used to manage the SSL - /// bindings for app's hostnames. - /// - [JsonProperty(PropertyName = "properties.hostNameSslStates")] - public IList HostNameSslStates { get; set; } - - /// - /// Gets or sets resource ID of the associated App Service plan, - /// formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// - [JsonProperty(PropertyName = "properties.serverFarmId")] - public string ServerFarmId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// reserved; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.reserved")] - public bool? Reserved { get; set; } - - /// - /// Gets or sets obsolete: Hyper-V sandbox. - /// - [JsonProperty(PropertyName = "properties.isXenon")] - public bool? IsXenon { get; set; } - - /// - /// Gets or sets hyper-V sandbox. - /// - [JsonProperty(PropertyName = "properties.hyperV")] - public bool? HyperV { get; set; } - - /// - /// Gets last time the app was modified, in UTC. Read-only. - /// - [JsonProperty(PropertyName = "properties.lastModifiedTimeUtc")] - public System.DateTime? LastModifiedTimeUtc { get; private set; } - - /// - /// Gets or sets configuration of the app. - /// - [JsonProperty(PropertyName = "properties.siteConfig")] - public SiteConfig SiteConfig { get; set; } - - /// - /// Gets azure Traffic Manager hostnames associated with the app. - /// Read-only. - /// - [JsonProperty(PropertyName = "properties.trafficManagerHostNames")] - public IList TrafficManagerHostNames { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to stop - /// SCM (KUDU) site when the app is stopped; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. The default is - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.scmSiteAlsoStopped")] - public bool? ScmSiteAlsoStopped { get; set; } - - /// - /// Gets specifies which deployment slot this app will swap into. - /// Read-only. - /// - [JsonProperty(PropertyName = "properties.targetSwapSlot")] - public string TargetSwapSlot { get; private set; } - - /// - /// Gets or sets app Service Environment to use for the app. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable client affinity; - /// &lt;code&gt;false&lt;/code&gt; to stop sending - /// session affinity cookies, which route client requests in the same - /// session to the same instance. Default is - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.clientAffinityEnabled")] - public bool? ClientAffinityEnabled { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable client certificate authentication (TLS mutual - /// authentication); otherwise, - /// &lt;code&gt;false&lt;/code&gt;. Default is - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.clientCertEnabled")] - public bool? ClientCertEnabled { get; set; } - - /// - /// Gets or sets this composes with ClientCertEnabled setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means - /// ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means - /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional', 'OptionalInteractiveUser' - /// - [JsonProperty(PropertyName = "properties.clientCertMode")] - public ClientCertMode? ClientCertMode { get; set; } - - /// - /// Gets or sets client certificate authentication comma-separated - /// exclusion paths - /// - [JsonProperty(PropertyName = "properties.clientCertExclusionPaths")] - public string ClientCertExclusionPaths { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// disable the public hostnames of the app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// If &lt;code&gt;true&lt;/code&gt;, the app is only - /// accessible via API management process. - /// - [JsonProperty(PropertyName = "properties.hostNamesDisabled")] - public bool? HostNamesDisabled { get; set; } - - /// - /// Gets or sets unique identifier that verifies the custom domains - /// assigned to the app. Customer will add this id to a txt record for - /// verification. - /// - [JsonProperty(PropertyName = "properties.customDomainVerificationId")] - public string CustomDomainVerificationId { get; set; } - - /// - /// Gets list of IP addresses that the app uses for outbound - /// connections (e.g. database access). Includes VIPs from tenants that - /// site can be hosted with current settings. Read-only. - /// - [JsonProperty(PropertyName = "properties.outboundIpAddresses")] - public string OutboundIpAddresses { get; private set; } - - /// - /// Gets list of IP addresses that the app uses for outbound - /// connections (e.g. database access). Includes VIPs from all tenants - /// except dataComponent. Read-only. - /// - [JsonProperty(PropertyName = "properties.possibleOutboundIpAddresses")] - public string PossibleOutboundIpAddresses { get; private set; } - - /// - /// Gets or sets size of the function container. - /// - [JsonProperty(PropertyName = "properties.containerSize")] - public int? ContainerSize { get; set; } - - /// - /// Gets or sets maximum allowed daily memory-time quota (applicable on - /// dynamic apps only). - /// - [JsonProperty(PropertyName = "properties.dailyMemoryTimeQuota")] - public int? DailyMemoryTimeQuota { get; set; } - - /// - /// Gets app suspended till in case memory-time quota is exceeded. - /// - [JsonProperty(PropertyName = "properties.suspendedTill")] - public System.DateTime? SuspendedTill { get; private set; } - - /// - /// Gets maximum number of workers. - /// This only applies to Functions container. - /// - [JsonProperty(PropertyName = "properties.maxNumberOfWorkers")] - public int? MaxNumberOfWorkers { get; private set; } - - /// - /// Gets or sets if specified during app creation, the app is cloned - /// from a source app. - /// - [JsonProperty(PropertyName = "properties.cloningInfo")] - public CloningInfo CloningInfo { get; set; } - - /// - /// Gets name of the resource group the app belongs to. Read-only. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the app is a - /// default container; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isDefaultContainer")] - public bool? IsDefaultContainer { get; private set; } - - /// - /// Gets default hostname of the app. Read-only. - /// - [JsonProperty(PropertyName = "properties.defaultHostName")] - public string DefaultHostName { get; private set; } - - /// - /// Gets status of the last deployment slot swap operation. - /// - [JsonProperty(PropertyName = "properties.slotSwapStatus")] - public SlotSwapStatus SlotSwapStatus { get; private set; } - - /// - /// Gets or sets httpsOnly: configures a web site to accept only https - /// requests. Issues redirect for - /// http requests - /// - [JsonProperty(PropertyName = "properties.httpsOnly")] - public bool? HttpsOnly { get; set; } - - /// - /// Gets or sets site redundancy mode. Possible values include: 'None', - /// 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' - /// - [JsonProperty(PropertyName = "properties.redundancyMode")] - public RedundancyMode? RedundancyMode { get; set; } - - /// - /// Gets specifies an operation id if this site has a pending - /// operation. - /// - [JsonProperty(PropertyName = "properties.inProgressOperationId")] - public System.Guid? InProgressOperationId { get; private set; } - - /// - /// Gets or sets checks if Customer provided storage account is - /// required - /// - [JsonProperty(PropertyName = "properties.storageAccountRequired")] - public bool? StorageAccountRequired { get; set; } - - /// - /// Gets or sets identity to use for Key Vault Reference - /// authentication. - /// - [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; set; } - - /// - /// Gets or sets azure Resource Manager ID of the Virtual network and - /// subnet to be joined by Regional VNET Integration. - /// This must be of the form - /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "properties.virtualNetworkSubnetId")] - public string VirtualNetworkSubnetId { get; set; } - - /// - /// - [JsonProperty(PropertyName = "identity")] - public ManagedServiceIdentity Identity { get; set; } - - /// - /// - [JsonProperty(PropertyName = "extendedLocation")] - public ExtendedLocation ExtendedLocation { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (SiteConfig != null) - { - SiteConfig.Validate(); - } - if (CloningInfo != null) - { - CloningInfo.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs deleted file mode 100644 index 892ce24ecff1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettings.cs +++ /dev/null @@ -1,612 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Configuration settings for the Azure App Service Authentication / - /// Authorization feature. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteAuthSettings : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteAuthSettings class. - /// - public SiteAuthSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteAuthSettings class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// <code>true</code> if the - /// Authentication / Authorization feature is enabled for the current - /// app; otherwise, <code>false</code>. - /// The RuntimeVersion of the - /// Authentication / Authorization feature in use for the current app. - /// The setting in this value can control the behavior of certain - /// features in the Authentication / Authorization module. - /// The action to take when - /// an unauthenticated client attempts to access the app. Possible - /// values include: 'RedirectToLoginPage', 'AllowAnonymous' - /// <code>true</code> to - /// durably store platform-specific security tokens that are obtained - /// during login flows; otherwise, <code>false</code>. - /// The default is <code>false</code>. - /// External URLs that can be - /// redirected to as part of logging in or logging out of the app. Note - /// that the query string part of the URL is ignored. - /// This is an advanced setting typically only needed by Windows Store - /// application backends. - /// Note that URLs within the current domain are always implicitly - /// allowed. - /// The default authentication provider - /// to use when multiple providers are configured. - /// This setting is only needed if multiple providers are configured - /// and the unauthenticated client - /// action is set to "RedirectToLoginPage". Possible values include: - /// 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', - /// 'Twitter', 'Github' - /// The number of hours after - /// session token expiration that a session token can be used to - /// call the token refresh API. The default is 72 hours. - /// The Client ID of this relying party - /// application, known as the client_id. - /// This setting is required for enabling OpenID Connection - /// authentication with Azure Active Directory or - /// other 3rd party OpenID Connect providers. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// The Client Secret of this relying party - /// application (in Azure Active Directory, this is also referred to as - /// the Key). - /// This setting is optional. If no client secret is configured, the - /// OpenID Connect implicit auth flow is used to authenticate end - /// users. - /// Otherwise, the OpenID Connect Authorization Code Flow is used to - /// authenticate end users. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// The app setting name that - /// contains the client secret of the relying party - /// application. - /// An alternative to - /// the client secret, that is the thumbprint of a certificate used for - /// signing purposes. This property acts as - /// a replacement for the Client Secret. It is also optional. - /// The OpenID Connect Issuer URI that represents - /// the entity which issues access tokens for this application. - /// When using Azure Active Directory, this value is the URI of the - /// directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. - /// This URI is a case-sensitive identifier for the token issuer. - /// More information on OpenID Connect Discovery: - /// http://openid.net/specs/openid-connect-discovery-1_0.html - /// Gets a value indicating whether the - /// issuer should be a valid HTTPS url and be validated as - /// such. - /// Allowed audience values to consider - /// when validating JWTs issued by - /// Azure Active Directory. Note that the - /// <code>ClientID</code> value is always considered an - /// allowed audience, regardless of this setting. - /// Login parameters to send to the - /// OpenID Connect authorization endpoint when - /// a user logs in. Each parameter must be in the form - /// "key=value". - /// Gets a JSON string containing - /// the Azure AD Acl settings. - /// The OpenID Connect Client ID for the - /// Google web application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// The client secret associated with - /// the Google web application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// The app setting name - /// that contains the client secret associated with - /// the Google web application. - /// The OAuth 2.0 scopes that will be - /// requested as part of Google Sign-In authentication. - /// This setting is optional. If not specified, "openid", "profile", - /// and "email" are used as default scopes. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// The App ID of the Facebook app used for - /// login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// The App Secret of the Facebook app - /// used for Facebook Login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// The app setting name - /// that contains the app secret used for Facebook Login. - /// The OAuth 2.0 scopes that will be - /// requested as part of Facebook Login authentication. - /// This setting is optional. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// The Client Id of the GitHub app used - /// for login. - /// This setting is required for enabling Github login - /// The Client Secret of the GitHub - /// app used for Github Login. - /// This setting is required for enabling Github login. - /// The app setting name - /// that contains the client secret of the Github - /// app used for GitHub Login. - /// The OAuth 2.0 scopes that will be - /// requested as part of GitHub Login authentication. - /// This setting is optional - /// The OAuth 1.0a consumer key of the - /// Twitter application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: - /// https://dev.twitter.com/web/sign-in - /// The OAuth 1.0a consumer secret - /// of the Twitter application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: - /// https://dev.twitter.com/web/sign-in - /// The app setting name - /// that contains the OAuth 1.0a consumer secret of the Twitter - /// application used for sign-in. - /// The OAuth 2.0 client ID that - /// was created for the app used for authentication. - /// This setting is required for enabling Microsoft Account - /// authentication. - /// Microsoft Account OAuth documentation: - /// https://dev.onedrive.com/auth/msa_oauth.htm - /// The OAuth 2.0 client - /// secret that was created for the app used for authentication. - /// This setting is required for enabling Microsoft Account - /// authentication. - /// Microsoft Account OAuth documentation: - /// https://dev.onedrive.com/auth/msa_oauth.htm - /// The app - /// setting name containing the OAuth 2.0 client secret that was - /// created for the - /// app used for authentication. - /// The OAuth 2.0 scopes that - /// will be requested as part of Microsoft Account authentication. - /// This setting is optional. If not specified, "wl.basic" is used as - /// the default scope. - /// Microsoft Account Scopes and permissions documentation: - /// https://msdn.microsoft.com/en-us/library/dn631845.aspx - /// "true" if the auth config settings - /// should be read from a file, - /// "false" otherwise - /// The path of the config file containing - /// auth settings. - /// If the path is relative, base will the site's root - /// directory. - /// The ConfigVersion of the Authentication - /// / Authorization feature in use for the current app. - /// The setting in this value can control the behavior of the control - /// plane for Authentication / Authorization. - public SiteAuthSettings(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? enabled = default(bool?), string runtimeVersion = default(string), UnauthenticatedClientAction? unauthenticatedClientAction = default(UnauthenticatedClientAction?), bool? tokenStoreEnabled = default(bool?), IList allowedExternalRedirectUrls = default(IList), BuiltInAuthenticationProvider? defaultProvider = default(BuiltInAuthenticationProvider?), double? tokenRefreshExtensionHours = default(double?), string clientId = default(string), string clientSecret = default(string), string clientSecretSettingName = default(string), string clientSecretCertificateThumbprint = default(string), string issuer = default(string), bool? validateIssuer = default(bool?), IList allowedAudiences = default(IList), IList additionalLoginParams = default(IList), string aadClaimsAuthorization = default(string), string googleClientId = default(string), string googleClientSecret = default(string), string googleClientSecretSettingName = default(string), IList googleOAuthScopes = default(IList), string facebookAppId = default(string), string facebookAppSecret = default(string), string facebookAppSecretSettingName = default(string), IList facebookOAuthScopes = default(IList), string gitHubClientId = default(string), string gitHubClientSecret = default(string), string gitHubClientSecretSettingName = default(string), IList gitHubOAuthScopes = default(IList), string twitterConsumerKey = default(string), string twitterConsumerSecret = default(string), string twitterConsumerSecretSettingName = default(string), string microsoftAccountClientId = default(string), string microsoftAccountClientSecret = default(string), string microsoftAccountClientSecretSettingName = default(string), IList microsoftAccountOAuthScopes = default(IList), string isAuthFromFile = default(string), string authFilePath = default(string), string configVersion = default(string)) - : base(id, name, kind, type) - { - Enabled = enabled; - RuntimeVersion = runtimeVersion; - UnauthenticatedClientAction = unauthenticatedClientAction; - TokenStoreEnabled = tokenStoreEnabled; - AllowedExternalRedirectUrls = allowedExternalRedirectUrls; - DefaultProvider = defaultProvider; - TokenRefreshExtensionHours = tokenRefreshExtensionHours; - ClientId = clientId; - ClientSecret = clientSecret; - ClientSecretSettingName = clientSecretSettingName; - ClientSecretCertificateThumbprint = clientSecretCertificateThumbprint; - Issuer = issuer; - ValidateIssuer = validateIssuer; - AllowedAudiences = allowedAudiences; - AdditionalLoginParams = additionalLoginParams; - AadClaimsAuthorization = aadClaimsAuthorization; - GoogleClientId = googleClientId; - GoogleClientSecret = googleClientSecret; - GoogleClientSecretSettingName = googleClientSecretSettingName; - GoogleOAuthScopes = googleOAuthScopes; - FacebookAppId = facebookAppId; - FacebookAppSecret = facebookAppSecret; - FacebookAppSecretSettingName = facebookAppSecretSettingName; - FacebookOAuthScopes = facebookOAuthScopes; - GitHubClientId = gitHubClientId; - GitHubClientSecret = gitHubClientSecret; - GitHubClientSecretSettingName = gitHubClientSecretSettingName; - GitHubOAuthScopes = gitHubOAuthScopes; - TwitterConsumerKey = twitterConsumerKey; - TwitterConsumerSecret = twitterConsumerSecret; - TwitterConsumerSecretSettingName = twitterConsumerSecretSettingName; - MicrosoftAccountClientId = microsoftAccountClientId; - MicrosoftAccountClientSecret = microsoftAccountClientSecret; - MicrosoftAccountClientSecretSettingName = microsoftAccountClientSecretSettingName; - MicrosoftAccountOAuthScopes = microsoftAccountOAuthScopes; - IsAuthFromFile = isAuthFromFile; - AuthFilePath = authFilePath; - ConfigVersion = configVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// Authentication / Authorization feature is enabled for the current - /// app; otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the RuntimeVersion of the Authentication / - /// Authorization feature in use for the current app. - /// The setting in this value can control the behavior of certain - /// features in the Authentication / Authorization module. - /// - [JsonProperty(PropertyName = "properties.runtimeVersion")] - public string RuntimeVersion { get; set; } - - /// - /// Gets or sets the action to take when an unauthenticated client - /// attempts to access the app. Possible values include: - /// 'RedirectToLoginPage', 'AllowAnonymous' - /// - [JsonProperty(PropertyName = "properties.unauthenticatedClientAction")] - public UnauthenticatedClientAction? UnauthenticatedClientAction { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// durably store platform-specific security tokens that are obtained - /// during login flows; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// The default is &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.tokenStoreEnabled")] - public bool? TokenStoreEnabled { get; set; } - - /// - /// Gets or sets external URLs that can be redirected to as part of - /// logging in or logging out of the app. Note that the query string - /// part of the URL is ignored. - /// This is an advanced setting typically only needed by Windows Store - /// application backends. - /// Note that URLs within the current domain are always implicitly - /// allowed. - /// - [JsonProperty(PropertyName = "properties.allowedExternalRedirectUrls")] - public IList AllowedExternalRedirectUrls { get; set; } - - /// - /// Gets or sets the default authentication provider to use when - /// multiple providers are configured. - /// This setting is only needed if multiple providers are configured - /// and the unauthenticated client - /// action is set to "RedirectToLoginPage". Possible values include: - /// 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', - /// 'Twitter', 'Github' - /// - [JsonProperty(PropertyName = "properties.defaultProvider")] - public BuiltInAuthenticationProvider? DefaultProvider { get; set; } - - /// - /// Gets or sets the number of hours after session token expiration - /// that a session token can be used to - /// call the token refresh API. The default is 72 hours. - /// - [JsonProperty(PropertyName = "properties.tokenRefreshExtensionHours")] - public double? TokenRefreshExtensionHours { get; set; } - - /// - /// Gets or sets the Client ID of this relying party application, known - /// as the client_id. - /// This setting is required for enabling OpenID Connection - /// authentication with Azure Active Directory or - /// other 3rd party OpenID Connect providers. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// - [JsonProperty(PropertyName = "properties.clientId")] - public string ClientId { get; set; } - - /// - /// Gets or sets the Client Secret of this relying party application - /// (in Azure Active Directory, this is also referred to as the Key). - /// This setting is optional. If no client secret is configured, the - /// OpenID Connect implicit auth flow is used to authenticate end - /// users. - /// Otherwise, the OpenID Connect Authorization Code Flow is used to - /// authenticate end users. - /// More information on OpenID Connect: - /// http://openid.net/specs/openid-connect-core-1_0.html - /// - [JsonProperty(PropertyName = "properties.clientSecret")] - public string ClientSecret { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret - /// of the relying party application. - /// - [JsonProperty(PropertyName = "properties.clientSecretSettingName")] - public string ClientSecretSettingName { get; set; } - - /// - /// Gets or sets an alternative to the client secret, that is the - /// thumbprint of a certificate used for signing purposes. This - /// property acts as - /// a replacement for the Client Secret. It is also optional. - /// - [JsonProperty(PropertyName = "properties.clientSecretCertificateThumbprint")] - public string ClientSecretCertificateThumbprint { get; set; } - - /// - /// Gets or sets the OpenID Connect Issuer URI that represents the - /// entity which issues access tokens for this application. - /// When using Azure Active Directory, this value is the URI of the - /// directory tenant, e.g. https://sts.windows.net/{tenant-guid}/. - /// This URI is a case-sensitive identifier for the token issuer. - /// More information on OpenID Connect Discovery: - /// http://openid.net/specs/openid-connect-discovery-1_0.html - /// - [JsonProperty(PropertyName = "properties.issuer")] - public string Issuer { get; set; } - - /// - /// Gets a value indicating whether the issuer should be a valid HTTPS - /// url and be validated as such. - /// - [JsonProperty(PropertyName = "properties.validateIssuer")] - public bool? ValidateIssuer { get; set; } - - /// - /// Gets or sets allowed audience values to consider when validating - /// JWTs issued by - /// Azure Active Directory. Note that the - /// &lt;code&gt;ClientID&lt;/code&gt; value is always - /// considered an - /// allowed audience, regardless of this setting. - /// - [JsonProperty(PropertyName = "properties.allowedAudiences")] - public IList AllowedAudiences { get; set; } - - /// - /// Gets or sets login parameters to send to the OpenID Connect - /// authorization endpoint when - /// a user logs in. Each parameter must be in the form "key=value". - /// - [JsonProperty(PropertyName = "properties.additionalLoginParams")] - public IList AdditionalLoginParams { get; set; } - - /// - /// Gets a JSON string containing the Azure AD Acl settings. - /// - [JsonProperty(PropertyName = "properties.aadClaimsAuthorization")] - public string AadClaimsAuthorization { get; set; } - - /// - /// Gets or sets the OpenID Connect Client ID for the Google web - /// application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// - [JsonProperty(PropertyName = "properties.googleClientId")] - public string GoogleClientId { get; set; } - - /// - /// Gets or sets the client secret associated with the Google web - /// application. - /// This setting is required for enabling Google Sign-In. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// - [JsonProperty(PropertyName = "properties.googleClientSecret")] - public string GoogleClientSecret { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret - /// associated with - /// the Google web application. - /// - [JsonProperty(PropertyName = "properties.googleClientSecretSettingName")] - public string GoogleClientSecretSettingName { get; set; } - - /// - /// Gets or sets the OAuth 2.0 scopes that will be requested as part of - /// Google Sign-In authentication. - /// This setting is optional. If not specified, "openid", "profile", - /// and "email" are used as default scopes. - /// Google Sign-In documentation: - /// https://developers.google.com/identity/sign-in/web/ - /// - [JsonProperty(PropertyName = "properties.googleOAuthScopes")] - public IList GoogleOAuthScopes { get; set; } - - /// - /// Gets or sets the App ID of the Facebook app used for login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// - [JsonProperty(PropertyName = "properties.facebookAppId")] - public string FacebookAppId { get; set; } - - /// - /// Gets or sets the App Secret of the Facebook app used for Facebook - /// Login. - /// This setting is required for enabling Facebook Login. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// - [JsonProperty(PropertyName = "properties.facebookAppSecret")] - public string FacebookAppSecret { get; set; } - - /// - /// Gets or sets the app setting name that contains the app secret used - /// for Facebook Login. - /// - [JsonProperty(PropertyName = "properties.facebookAppSecretSettingName")] - public string FacebookAppSecretSettingName { get; set; } - - /// - /// Gets or sets the OAuth 2.0 scopes that will be requested as part of - /// Facebook Login authentication. - /// This setting is optional. - /// Facebook Login documentation: - /// https://developers.facebook.com/docs/facebook-login - /// - [JsonProperty(PropertyName = "properties.facebookOAuthScopes")] - public IList FacebookOAuthScopes { get; set; } - - /// - /// Gets or sets the Client Id of the GitHub app used for login. - /// This setting is required for enabling Github login - /// - [JsonProperty(PropertyName = "properties.gitHubClientId")] - public string GitHubClientId { get; set; } - - /// - /// Gets or sets the Client Secret of the GitHub app used for Github - /// Login. - /// This setting is required for enabling Github login. - /// - [JsonProperty(PropertyName = "properties.gitHubClientSecret")] - public string GitHubClientSecret { get; set; } - - /// - /// Gets or sets the app setting name that contains the client secret - /// of the Github - /// app used for GitHub Login. - /// - [JsonProperty(PropertyName = "properties.gitHubClientSecretSettingName")] - public string GitHubClientSecretSettingName { get; set; } - - /// - /// Gets or sets the OAuth 2.0 scopes that will be requested as part of - /// GitHub Login authentication. - /// This setting is optional - /// - [JsonProperty(PropertyName = "properties.gitHubOAuthScopes")] - public IList GitHubOAuthScopes { get; set; } - - /// - /// Gets or sets the OAuth 1.0a consumer key of the Twitter application - /// used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - /// - [JsonProperty(PropertyName = "properties.twitterConsumerKey")] - public string TwitterConsumerKey { get; set; } - - /// - /// Gets or sets the OAuth 1.0a consumer secret of the Twitter - /// application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - /// - [JsonProperty(PropertyName = "properties.twitterConsumerSecret")] - public string TwitterConsumerSecret { get; set; } - - /// - /// Gets or sets the app setting name that contains the OAuth 1.0a - /// consumer secret of the Twitter - /// application used for sign-in. - /// - [JsonProperty(PropertyName = "properties.twitterConsumerSecretSettingName")] - public string TwitterConsumerSecretSettingName { get; set; } - - /// - /// Gets or sets the OAuth 2.0 client ID that was created for the app - /// used for authentication. - /// This setting is required for enabling Microsoft Account - /// authentication. - /// Microsoft Account OAuth documentation: - /// https://dev.onedrive.com/auth/msa_oauth.htm - /// - [JsonProperty(PropertyName = "properties.microsoftAccountClientId")] - public string MicrosoftAccountClientId { get; set; } - - /// - /// Gets or sets the OAuth 2.0 client secret that was created for the - /// app used for authentication. - /// This setting is required for enabling Microsoft Account - /// authentication. - /// Microsoft Account OAuth documentation: - /// https://dev.onedrive.com/auth/msa_oauth.htm - /// - [JsonProperty(PropertyName = "properties.microsoftAccountClientSecret")] - public string MicrosoftAccountClientSecret { get; set; } - - /// - /// Gets or sets the app setting name containing the OAuth 2.0 client - /// secret that was created for the - /// app used for authentication. - /// - [JsonProperty(PropertyName = "properties.microsoftAccountClientSecretSettingName")] - public string MicrosoftAccountClientSecretSettingName { get; set; } - - /// - /// Gets or sets the OAuth 2.0 scopes that will be requested as part of - /// Microsoft Account authentication. - /// This setting is optional. If not specified, "wl.basic" is used as - /// the default scope. - /// Microsoft Account Scopes and permissions documentation: - /// https://msdn.microsoft.com/en-us/library/dn631845.aspx - /// - [JsonProperty(PropertyName = "properties.microsoftAccountOAuthScopes")] - public IList MicrosoftAccountOAuthScopes { get; set; } - - /// - /// Gets or sets "true" if the auth config settings should be read from - /// a file, - /// "false" otherwise - /// - [JsonProperty(PropertyName = "properties.isAuthFromFile")] - public string IsAuthFromFile { get; set; } - - /// - /// Gets or sets the path of the config file containing auth settings. - /// If the path is relative, base will the site's root directory. - /// - [JsonProperty(PropertyName = "properties.authFilePath")] - public string AuthFilePath { get; set; } - - /// - /// Gets or sets the ConfigVersion of the Authentication / - /// Authorization feature in use for the current app. - /// The setting in this value can control the behavior of the control - /// plane for Authentication / Authorization. - /// - [JsonProperty(PropertyName = "properties.configVersion")] - public string ConfigVersion { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs deleted file mode 100644 index b2ab90429587..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAuthSettingsV2.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Configuration settings for the Azure App Service Authentication / - /// Authorization V2 feature. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteAuthSettingsV2 : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteAuthSettingsV2 class. - /// - public SiteAuthSettingsV2() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteAuthSettingsV2 class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The configuration settings of the platform - /// of App Service Authentication/Authorization. - /// The configuration settings that - /// determines the validation flow of users using App Service - /// Authentication/Authorization. - /// The configuration settings of each - /// of the identity providers used to configure App Service - /// Authentication/Authorization. - /// The configuration settings of the login flow of - /// users using App Service Authentication/Authorization. - /// The configuration settings of the HTTP - /// requests for authentication and authorization requests made against - /// App Service Authentication/Authorization. - public SiteAuthSettingsV2(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), AuthPlatform platform = default(AuthPlatform), GlobalValidation globalValidation = default(GlobalValidation), IdentityProviders identityProviders = default(IdentityProviders), Login login = default(Login), HttpSettings httpSettings = default(HttpSettings)) - : base(id, name, kind, type) - { - Platform = platform; - GlobalValidation = globalValidation; - IdentityProviders = identityProviders; - Login = login; - HttpSettings = httpSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the configuration settings of the platform of App - /// Service Authentication/Authorization. - /// - [JsonProperty(PropertyName = "properties.platform")] - public AuthPlatform Platform { get; set; } - - /// - /// Gets or sets the configuration settings that determines the - /// validation flow of users using App Service - /// Authentication/Authorization. - /// - [JsonProperty(PropertyName = "properties.globalValidation")] - public GlobalValidation GlobalValidation { get; set; } - - /// - /// Gets or sets the configuration settings of each of the identity - /// providers used to configure App Service - /// Authentication/Authorization. - /// - [JsonProperty(PropertyName = "properties.identityProviders")] - public IdentityProviders IdentityProviders { get; set; } - - /// - /// Gets or sets the configuration settings of the login flow of users - /// using App Service Authentication/Authorization. - /// - [JsonProperty(PropertyName = "properties.login")] - public Login Login { get; set; } - - /// - /// Gets or sets the configuration settings of the HTTP requests for - /// authentication and authorization requests made against App Service - /// Authentication/Authorization. - /// - [JsonProperty(PropertyName = "properties.httpSettings")] - public HttpSettings HttpSettings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAvailabilityState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAvailabilityState.cs deleted file mode 100644 index 022c239de27e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteAvailabilityState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SiteAvailabilityState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SiteAvailabilityState - { - [EnumMember(Value = "Normal")] - Normal, - [EnumMember(Value = "Limited")] - Limited, - [EnumMember(Value = "DisasterRecoveryMode")] - DisasterRecoveryMode - } - internal static class SiteAvailabilityStateEnumExtension - { - internal static string ToSerializedValue(this SiteAvailabilityState? value) - { - return value == null ? null : ((SiteAvailabilityState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SiteAvailabilityState value) - { - switch( value ) - { - case SiteAvailabilityState.Normal: - return "Normal"; - case SiteAvailabilityState.Limited: - return "Limited"; - case SiteAvailabilityState.DisasterRecoveryMode: - return "DisasterRecoveryMode"; - } - return null; - } - - internal static SiteAvailabilityState? ParseSiteAvailabilityState(this string value) - { - switch( value ) - { - case "Normal": - return SiteAvailabilityState.Normal; - case "Limited": - return SiteAvailabilityState.Limited; - case "DisasterRecoveryMode": - return SiteAvailabilityState.DisasterRecoveryMode; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneability.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneability.cs deleted file mode 100644 index aceacabea031..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneability.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Represents whether or not an app is cloneable. - /// - public partial class SiteCloneability - { - /// - /// Initializes a new instance of the SiteCloneability class. - /// - public SiteCloneability() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteCloneability class. - /// - /// Name of app. Possible values include: - /// 'Cloneable', 'PartiallyCloneable', 'NotCloneable' - /// List of features enabled on app that - /// prevent cloning. - /// List of features enabled on app - /// that are non-blocking but cannot be cloned. The app can still be - /// cloned - /// but the features in this list will not be set up on cloned - /// app. - /// List of blocking application - /// characteristics. - public SiteCloneability(CloneAbilityResult? result = default(CloneAbilityResult?), IList blockingFeatures = default(IList), IList unsupportedFeatures = default(IList), IList blockingCharacteristics = default(IList)) - { - Result = result; - BlockingFeatures = blockingFeatures; - UnsupportedFeatures = unsupportedFeatures; - BlockingCharacteristics = blockingCharacteristics; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of app. Possible values include: 'Cloneable', - /// 'PartiallyCloneable', 'NotCloneable' - /// - [JsonProperty(PropertyName = "result")] - public CloneAbilityResult? Result { get; set; } - - /// - /// Gets or sets list of features enabled on app that prevent cloning. - /// - [JsonProperty(PropertyName = "blockingFeatures")] - public IList BlockingFeatures { get; set; } - - /// - /// Gets or sets list of features enabled on app that are non-blocking - /// but cannot be cloned. The app can still be cloned - /// but the features in this list will not be set up on cloned app. - /// - [JsonProperty(PropertyName = "unsupportedFeatures")] - public IList UnsupportedFeatures { get; set; } - - /// - /// Gets or sets list of blocking application characteristics. - /// - [JsonProperty(PropertyName = "blockingCharacteristics")] - public IList BlockingCharacteristics { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneabilityCriterion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneabilityCriterion.cs deleted file mode 100644 index eab80a8c1a0c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteCloneabilityCriterion.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// An app cloneability criterion. - /// - public partial class SiteCloneabilityCriterion - { - /// - /// Initializes a new instance of the SiteCloneabilityCriterion class. - /// - public SiteCloneabilityCriterion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteCloneabilityCriterion class. - /// - /// Name of criterion. - /// Description of criterion. - public SiteCloneabilityCriterion(string name = default(string), string description = default(string)) - { - Name = name; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of criterion. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets description of criterion. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs deleted file mode 100644 index 58c40d7011d1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfig.cs +++ /dev/null @@ -1,741 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Configuration of an App Service app. - /// - public partial class SiteConfig - { - /// - /// Initializes a new instance of the SiteConfig class. - /// - public SiteConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteConfig class. - /// - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and - /// version - /// Xenon App Framework and - /// version - /// <code>true</code> - /// if request tracing is enabled; otherwise, - /// <code>false</code>. - /// Request tracing - /// expiration time. - /// <code>true</code> - /// if remote debugging is enabled; otherwise, - /// <code>false</code>. - /// Remote debugging - /// version. - /// <code>true</code> if - /// HTTP logging is enabled; otherwise, - /// <code>false</code>. - /// Flag to use Managed - /// Identity Creds for ACR pull - /// If using user managed - /// identity, the user managed identity ClientId - /// HTTP logs directory size - /// limit. - /// <code>true</code> if - /// detailed error logging is enabled; otherwise, - /// <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. Possible values include: 'None', - /// 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', - /// 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', - /// 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM' - /// <code>true</code> - /// to use 32-bit worker process; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// WebSocket is enabled; otherwise, - /// <code>false</code>. - /// <code>true</code> if Always On - /// is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. Possible - /// values include: 'Integrated', 'Classic' - /// Virtual applications. - /// Site load balancing. Possible values - /// include: 'WeightedRoundRobin', 'LeastRequests', - /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash', - /// 'PerSiteRoundRobin' - /// This is work around for polymorphic - /// types. - /// Site limits. - /// <code>true</code> if Auto - /// Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All - /// enabled. This causes all outbound traffic to have Virtual Network - /// Security Groups and User Defined Routes applied. - /// The number of private ports - /// assigned to this app. These will be assigned dynamically on - /// runtime. - /// Cross-Origin Resource Sharing (CORS) - /// settings. - /// Push endpoint settings. - /// Information about the formal API - /// definition for the app. - /// Azure API management settings - /// linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to - /// enable local MySQL; otherwise, - /// <code>false</code>. - /// Managed Service Identity - /// Id - /// Explicit Managed Service - /// Identity Id - /// Identity to use for Key - /// Vault Reference authentication. - /// IP security restrictions for - /// main. - /// IP security restrictions - /// for scm. - /// IP security - /// restrictions for scm to use main. - /// Http20Enabled: configures a web site to - /// allow clients to connect over http2.0 - /// MinTlsVersion: configures the minimum - /// version of TLS required for SSL requests. Possible values include: - /// '1.0', '1.1', '1.2' - /// ScmMinTlsVersion: configures the - /// minimum version of TLS required for SSL requests for SCM site. - /// Possible values include: '1.0', '1.1', '1.2' - /// State of FTP / FTPS service. Possible - /// values include: 'AllAllowed', 'FtpsOnly', 'Disabled' - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic - /// Plans - /// Maximum number of workers that - /// a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium - /// Plans - /// Health check path - /// Gets or sets a - /// value indicating whether functions runtime scale monitoring is - /// enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but - /// will instead call to the - /// runtime to get scale status. - /// Sets the time zone a site uses for - /// generating timestamps. Compatible with Linux and Windows App - /// Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence - /// over this config. For Linux, expects tz database values - /// https://www.iana.org/time-zones (for a quick reference see - /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For - /// Windows, expects one of the time zones listed under - /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - /// NT\CurrentVersion\Time Zones - /// Number of minimum - /// instance count for a site - /// This setting only applies to the Elastic Plans - /// List of Azure Storage - /// Accounts. - /// Property to allow or block all - /// public traffic. - public SiteConfig(int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), bool? acrUseManagedIdentityCreds = default(bool?), string acrUserManagedIdentityID = default(string), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), bool? vnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = default(string), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string scmMinTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = default(string), bool? functionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = default(string), int? minimumElasticInstanceCount = default(int?), IDictionary azureStorageAccounts = default(IDictionary), string publicNetworkAccess = default(string)) - { - NumberOfWorkers = numberOfWorkers; - DefaultDocuments = defaultDocuments; - NetFrameworkVersion = netFrameworkVersion; - PhpVersion = phpVersion; - PythonVersion = pythonVersion; - NodeVersion = nodeVersion; - PowerShellVersion = powerShellVersion; - LinuxFxVersion = linuxFxVersion; - WindowsFxVersion = windowsFxVersion; - RequestTracingEnabled = requestTracingEnabled; - RequestTracingExpirationTime = requestTracingExpirationTime; - RemoteDebuggingEnabled = remoteDebuggingEnabled; - RemoteDebuggingVersion = remoteDebuggingVersion; - HttpLoggingEnabled = httpLoggingEnabled; - AcrUseManagedIdentityCreds = acrUseManagedIdentityCreds; - AcrUserManagedIdentityID = acrUserManagedIdentityID; - LogsDirectorySizeLimit = logsDirectorySizeLimit; - DetailedErrorLoggingEnabled = detailedErrorLoggingEnabled; - PublishingUsername = publishingUsername; - AppSettings = appSettings; - ConnectionStrings = connectionStrings; - MachineKey = machineKey; - HandlerMappings = handlerMappings; - DocumentRoot = documentRoot; - ScmType = scmType; - Use32BitWorkerProcess = use32BitWorkerProcess; - WebSocketsEnabled = webSocketsEnabled; - AlwaysOn = alwaysOn; - JavaVersion = javaVersion; - JavaContainer = javaContainer; - JavaContainerVersion = javaContainerVersion; - AppCommandLine = appCommandLine; - ManagedPipelineMode = managedPipelineMode; - VirtualApplications = virtualApplications; - LoadBalancing = loadBalancing; - Experiments = experiments; - Limits = limits; - AutoHealEnabled = autoHealEnabled; - AutoHealRules = autoHealRules; - TracingOptions = tracingOptions; - VnetName = vnetName; - VnetRouteAllEnabled = vnetRouteAllEnabled; - VnetPrivatePortsCount = vnetPrivatePortsCount; - Cors = cors; - Push = push; - ApiDefinition = apiDefinition; - ApiManagementConfig = apiManagementConfig; - AutoSwapSlotName = autoSwapSlotName; - LocalMySqlEnabled = localMySqlEnabled; - ManagedServiceIdentityId = managedServiceIdentityId; - XManagedServiceIdentityId = xManagedServiceIdentityId; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - IpSecurityRestrictions = ipSecurityRestrictions; - ScmIpSecurityRestrictions = scmIpSecurityRestrictions; - ScmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; - Http20Enabled = http20Enabled; - MinTlsVersion = minTlsVersion; - ScmMinTlsVersion = scmMinTlsVersion; - FtpsState = ftpsState; - PreWarmedInstanceCount = preWarmedInstanceCount; - FunctionAppScaleLimit = functionAppScaleLimit; - HealthCheckPath = healthCheckPath; - FunctionsRuntimeScaleMonitoringEnabled = functionsRuntimeScaleMonitoringEnabled; - WebsiteTimeZone = websiteTimeZone; - MinimumElasticInstanceCount = minimumElasticInstanceCount; - AzureStorageAccounts = azureStorageAccounts; - PublicNetworkAccess = publicNetworkAccess; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets number of workers. - /// - [JsonProperty(PropertyName = "numberOfWorkers")] - public int? NumberOfWorkers { get; set; } - - /// - /// Gets or sets default documents. - /// - [JsonProperty(PropertyName = "defaultDocuments")] - public IList DefaultDocuments { get; set; } - - /// - /// Gets or sets .NET Framework version. - /// - [JsonProperty(PropertyName = "netFrameworkVersion")] - public string NetFrameworkVersion { get; set; } - - /// - /// Gets or sets version of PHP. - /// - [JsonProperty(PropertyName = "phpVersion")] - public string PhpVersion { get; set; } - - /// - /// Gets or sets version of Python. - /// - [JsonProperty(PropertyName = "pythonVersion")] - public string PythonVersion { get; set; } - - /// - /// Gets or sets version of Node.js. - /// - [JsonProperty(PropertyName = "nodeVersion")] - public string NodeVersion { get; set; } - - /// - /// Gets or sets version of PowerShell. - /// - [JsonProperty(PropertyName = "powerShellVersion")] - public string PowerShellVersion { get; set; } - - /// - /// Gets or sets linux App Framework and version - /// - [JsonProperty(PropertyName = "linuxFxVersion")] - public string LinuxFxVersion { get; set; } - - /// - /// Gets or sets xenon App Framework and version - /// - [JsonProperty(PropertyName = "windowsFxVersion")] - public string WindowsFxVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// request tracing is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "requestTracingEnabled")] - public bool? RequestTracingEnabled { get; set; } - - /// - /// Gets or sets request tracing expiration time. - /// - [JsonProperty(PropertyName = "requestTracingExpirationTime")] - public System.DateTime? RequestTracingExpirationTime { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// remote debugging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "remoteDebuggingEnabled")] - public bool? RemoteDebuggingEnabled { get; set; } - - /// - /// Gets or sets remote debugging version. - /// - [JsonProperty(PropertyName = "remoteDebuggingVersion")] - public string RemoteDebuggingVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if HTTP - /// logging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "httpLoggingEnabled")] - public bool? HttpLoggingEnabled { get; set; } - - /// - /// Gets or sets flag to use Managed Identity Creds for ACR pull - /// - [JsonProperty(PropertyName = "acrUseManagedIdentityCreds")] - public bool? AcrUseManagedIdentityCreds { get; set; } - - /// - /// Gets or sets if using user managed identity, the user managed - /// identity ClientId - /// - [JsonProperty(PropertyName = "acrUserManagedIdentityID")] - public string AcrUserManagedIdentityID { get; set; } - - /// - /// Gets or sets HTTP logs directory size limit. - /// - [JsonProperty(PropertyName = "logsDirectorySizeLimit")] - public int? LogsDirectorySizeLimit { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// detailed error logging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "detailedErrorLoggingEnabled")] - public bool? DetailedErrorLoggingEnabled { get; set; } - - /// - /// Gets or sets publishing user name. - /// - [JsonProperty(PropertyName = "publishingUsername")] - public string PublishingUsername { get; set; } - - /// - /// Gets or sets application settings. - /// - [JsonProperty(PropertyName = "appSettings")] - public IList AppSettings { get; set; } - - /// - /// Gets or sets connection strings. - /// - [JsonProperty(PropertyName = "connectionStrings")] - public IList ConnectionStrings { get; set; } - - /// - /// Gets site MachineKey. - /// - [JsonProperty(PropertyName = "machineKey")] - public SiteMachineKey MachineKey { get; private set; } - - /// - /// Gets or sets handler mappings. - /// - [JsonProperty(PropertyName = "handlerMappings")] - public IList HandlerMappings { get; set; } - - /// - /// Gets or sets document root. - /// - [JsonProperty(PropertyName = "documentRoot")] - public string DocumentRoot { get; set; } - - /// - /// Gets or sets SCM type. Possible values include: 'None', 'Dropbox', - /// 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', - /// 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', - /// 'OneDrive', 'VSO', 'VSTSRM' - /// - [JsonProperty(PropertyName = "scmType")] - public string ScmType { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to use - /// 32-bit worker process; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "use32BitWorkerProcess")] - public bool? Use32BitWorkerProcess { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// WebSocket is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "webSocketsEnabled")] - public bool? WebSocketsEnabled { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// Always On is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "alwaysOn")] - public bool? AlwaysOn { get; set; } - - /// - /// Gets or sets java version. - /// - [JsonProperty(PropertyName = "javaVersion")] - public string JavaVersion { get; set; } - - /// - /// Gets or sets java container. - /// - [JsonProperty(PropertyName = "javaContainer")] - public string JavaContainer { get; set; } - - /// - /// Gets or sets java container version. - /// - [JsonProperty(PropertyName = "javaContainerVersion")] - public string JavaContainerVersion { get; set; } - - /// - /// Gets or sets app command line to launch. - /// - [JsonProperty(PropertyName = "appCommandLine")] - public string AppCommandLine { get; set; } - - /// - /// Gets or sets managed pipeline mode. Possible values include: - /// 'Integrated', 'Classic' - /// - [JsonProperty(PropertyName = "managedPipelineMode")] - public ManagedPipelineMode? ManagedPipelineMode { get; set; } - - /// - /// Gets or sets virtual applications. - /// - [JsonProperty(PropertyName = "virtualApplications")] - public IList VirtualApplications { get; set; } - - /// - /// Gets or sets site load balancing. Possible values include: - /// 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - /// 'WeightedTotalTraffic', 'RequestHash', 'PerSiteRoundRobin' - /// - [JsonProperty(PropertyName = "loadBalancing")] - public SiteLoadBalancing? LoadBalancing { get; set; } - - /// - /// Gets or sets this is work around for polymorphic types. - /// - [JsonProperty(PropertyName = "experiments")] - public Experiments Experiments { get; set; } - - /// - /// Gets or sets site limits. - /// - [JsonProperty(PropertyName = "limits")] - public SiteLimits Limits { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if Auto - /// Heal is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "autoHealEnabled")] - public bool? AutoHealEnabled { get; set; } - - /// - /// Gets or sets auto Heal rules. - /// - [JsonProperty(PropertyName = "autoHealRules")] - public AutoHealRules AutoHealRules { get; set; } - - /// - /// Gets or sets tracing options. - /// - [JsonProperty(PropertyName = "tracingOptions")] - public string TracingOptions { get; set; } - - /// - /// Gets or sets virtual Network name. - /// - [JsonProperty(PropertyName = "vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets virtual Network Route All enabled. This causes all - /// outbound traffic to have Virtual Network Security Groups and User - /// Defined Routes applied. - /// - [JsonProperty(PropertyName = "vnetRouteAllEnabled")] - public bool? VnetRouteAllEnabled { get; set; } - - /// - /// Gets or sets the number of private ports assigned to this app. - /// These will be assigned dynamically on runtime. - /// - [JsonProperty(PropertyName = "vnetPrivatePortsCount")] - public int? VnetPrivatePortsCount { get; set; } - - /// - /// Gets or sets cross-Origin Resource Sharing (CORS) settings. - /// - [JsonProperty(PropertyName = "cors")] - public CorsSettings Cors { get; set; } - - /// - /// Gets or sets push endpoint settings. - /// - [JsonProperty(PropertyName = "push")] - public PushSettings Push { get; set; } - - /// - /// Gets or sets information about the formal API definition for the - /// app. - /// - [JsonProperty(PropertyName = "apiDefinition")] - public ApiDefinitionInfo ApiDefinition { get; set; } - - /// - /// Gets or sets azure API management settings linked to the app. - /// - [JsonProperty(PropertyName = "apiManagementConfig")] - public ApiManagementConfig ApiManagementConfig { get; set; } - - /// - /// Gets or sets auto-swap slot name. - /// - [JsonProperty(PropertyName = "autoSwapSlotName")] - public string AutoSwapSlotName { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable local MySQL; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "localMySqlEnabled")] - public bool? LocalMySqlEnabled { get; set; } - - /// - /// Gets or sets managed Service Identity Id - /// - [JsonProperty(PropertyName = "managedServiceIdentityId")] - public int? ManagedServiceIdentityId { get; set; } - - /// - /// Gets or sets explicit Managed Service Identity Id - /// - [JsonProperty(PropertyName = "xManagedServiceIdentityId")] - public int? XManagedServiceIdentityId { get; set; } - - /// - /// Gets or sets identity to use for Key Vault Reference - /// authentication. - /// - [JsonProperty(PropertyName = "keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; set; } - - /// - /// Gets or sets IP security restrictions for main. - /// - [JsonProperty(PropertyName = "ipSecurityRestrictions")] - public IList IpSecurityRestrictions { get; set; } - - /// - /// Gets or sets IP security restrictions for scm. - /// - [JsonProperty(PropertyName = "scmIpSecurityRestrictions")] - public IList ScmIpSecurityRestrictions { get; set; } - - /// - /// Gets or sets IP security restrictions for scm to use main. - /// - [JsonProperty(PropertyName = "scmIpSecurityRestrictionsUseMain")] - public bool? ScmIpSecurityRestrictionsUseMain { get; set; } - - /// - /// Gets or sets http20Enabled: configures a web site to allow clients - /// to connect over http2.0 - /// - [JsonProperty(PropertyName = "http20Enabled")] - public bool? Http20Enabled { get; set; } - - /// - /// Gets or sets minTlsVersion: configures the minimum version of TLS - /// required for SSL requests. Possible values include: '1.0', '1.1', - /// '1.2' - /// - [JsonProperty(PropertyName = "minTlsVersion")] - public string MinTlsVersion { get; set; } - - /// - /// Gets or sets scmMinTlsVersion: configures the minimum version of - /// TLS required for SSL requests for SCM site. Possible values - /// include: '1.0', '1.1', '1.2' - /// - [JsonProperty(PropertyName = "scmMinTlsVersion")] - public string ScmMinTlsVersion { get; set; } - - /// - /// Gets or sets state of FTP / FTPS service. Possible values include: - /// 'AllAllowed', 'FtpsOnly', 'Disabled' - /// - [JsonProperty(PropertyName = "ftpsState")] - public string FtpsState { get; set; } - - /// - /// Gets or sets number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - [JsonProperty(PropertyName = "preWarmedInstanceCount")] - public int? PreWarmedInstanceCount { get; set; } - - /// - /// Gets or sets maximum number of workers that a site can scale out - /// to. - /// This setting only applies to the Consumption and Elastic Premium - /// Plans - /// - [JsonProperty(PropertyName = "functionAppScaleLimit")] - public int? FunctionAppScaleLimit { get; set; } - - /// - /// Gets or sets health check path - /// - [JsonProperty(PropertyName = "healthCheckPath")] - public string HealthCheckPath { get; set; } - - /// - /// Gets or sets a value indicating whether functions runtime scale - /// monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but - /// will instead call to the - /// runtime to get scale status. - /// - [JsonProperty(PropertyName = "functionsRuntimeScaleMonitoringEnabled")] - public bool? FunctionsRuntimeScaleMonitoringEnabled { get; set; } - - /// - /// Gets or sets sets the time zone a site uses for generating - /// timestamps. Compatible with Linux and Windows App Service. Setting - /// the WEBSITE_TIME_ZONE app setting takes precedence over this - /// config. For Linux, expects tz database values - /// https://www.iana.org/time-zones (for a quick reference see - /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For - /// Windows, expects one of the time zones listed under - /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - /// NT\CurrentVersion\Time Zones - /// - [JsonProperty(PropertyName = "websiteTimeZone")] - public string WebsiteTimeZone { get; set; } - - /// - /// Gets or sets number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - [JsonProperty(PropertyName = "minimumElasticInstanceCount")] - public int? MinimumElasticInstanceCount { get; set; } - - /// - /// Gets or sets list of Azure Storage Accounts. - /// - [JsonProperty(PropertyName = "azureStorageAccounts")] - public IDictionary AzureStorageAccounts { get; set; } - - /// - /// Gets or sets property to allow or block all public traffic. - /// - [JsonProperty(PropertyName = "publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Push != null) - { - Push.Validate(); - } - if (PreWarmedInstanceCount > 10) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PreWarmedInstanceCount", 10); - } - if (PreWarmedInstanceCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "PreWarmedInstanceCount", 0); - } - if (FunctionAppScaleLimit < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "FunctionAppScaleLimit", 0); - } - if (MinimumElasticInstanceCount > 20) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "MinimumElasticInstanceCount", 20); - } - if (MinimumElasticInstanceCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "MinimumElasticInstanceCount", 0); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs deleted file mode 100644 index d331ddb6de0e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigPropertiesDictionary.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Site config properties dictionary. - /// - public partial class SiteConfigPropertiesDictionary - { - /// - /// Initializes a new instance of the SiteConfigPropertiesDictionary - /// class. - /// - public SiteConfigPropertiesDictionary() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteConfigPropertiesDictionary - /// class. - /// - /// <code>true</code> - /// if use32BitWorkerProcess should be set to true for the stack; - /// otherwise, <code>false</code>. - /// LinuxFxVersion configuration - /// setting. - /// JavaVersion configuration - /// setting. - /// PowerShellVersion configuration - /// setting. - public SiteConfigPropertiesDictionary(bool? use32BitWorkerProcess = default(bool?), string linuxFxVersion = default(string), string javaVersion = default(string), string powerShellVersion = default(string)) - { - Use32BitWorkerProcess = use32BitWorkerProcess; - LinuxFxVersion = linuxFxVersion; - JavaVersion = javaVersion; - PowerShellVersion = powerShellVersion; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if - /// use32BitWorkerProcess should be set to true for the stack; - /// otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "use32BitWorkerProcess")] - public bool? Use32BitWorkerProcess { get; private set; } - - /// - /// Gets linuxFxVersion configuration setting. - /// - [JsonProperty(PropertyName = "linuxFxVersion")] - public string LinuxFxVersion { get; private set; } - - /// - /// Gets javaVersion configuration setting. - /// - [JsonProperty(PropertyName = "javaVersion")] - public string JavaVersion { get; private set; } - - /// - /// Gets powerShellVersion configuration setting. - /// - [JsonProperty(PropertyName = "powerShellVersion")] - public string PowerShellVersion { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs deleted file mode 100644 index 64431460f147..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigResource.cs +++ /dev/null @@ -1,748 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Web app configuration ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteConfigResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteConfigResource class. - /// - public SiteConfigResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteConfigResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Number of workers. - /// Default documents. - /// .NET Framework version. - /// Version of PHP. - /// Version of Python. - /// Version of Node.js. - /// Version of PowerShell. - /// Linux App Framework and - /// version - /// Xenon App Framework and - /// version - /// <code>true</code> - /// if request tracing is enabled; otherwise, - /// <code>false</code>. - /// Request tracing - /// expiration time. - /// <code>true</code> - /// if remote debugging is enabled; otherwise, - /// <code>false</code>. - /// Remote debugging - /// version. - /// <code>true</code> if - /// HTTP logging is enabled; otherwise, - /// <code>false</code>. - /// Flag to use Managed - /// Identity Creds for ACR pull - /// If using user managed - /// identity, the user managed identity ClientId - /// HTTP logs directory size - /// limit. - /// <code>true</code> if - /// detailed error logging is enabled; otherwise, - /// <code>false</code>. - /// Publishing user name. - /// Application settings. - /// Connection strings. - /// Site MachineKey. - /// Handler mappings. - /// Document root. - /// SCM type. Possible values include: 'None', - /// 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', - /// 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', - /// 'ExternalHg', 'OneDrive', 'VSO', 'VSTSRM' - /// <code>true</code> - /// to use 32-bit worker process; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// WebSocket is enabled; otherwise, - /// <code>false</code>. - /// <code>true</code> if Always On - /// is enabled; otherwise, <code>false</code>. - /// Java version. - /// Java container. - /// Java container version. - /// App command line to launch. - /// Managed pipeline mode. Possible - /// values include: 'Integrated', 'Classic' - /// Virtual applications. - /// Site load balancing. Possible values - /// include: 'WeightedRoundRobin', 'LeastRequests', - /// 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash', - /// 'PerSiteRoundRobin' - /// This is work around for polymorphic - /// types. - /// Site limits. - /// <code>true</code> if Auto - /// Heal is enabled; otherwise, <code>false</code>. - /// Auto Heal rules. - /// Tracing options. - /// Virtual Network name. - /// Virtual Network Route All - /// enabled. This causes all outbound traffic to have Virtual Network - /// Security Groups and User Defined Routes applied. - /// The number of private ports - /// assigned to this app. These will be assigned dynamically on - /// runtime. - /// Cross-Origin Resource Sharing (CORS) - /// settings. - /// Push endpoint settings. - /// Information about the formal API - /// definition for the app. - /// Azure API management settings - /// linked to the app. - /// Auto-swap slot name. - /// <code>true</code> to - /// enable local MySQL; otherwise, - /// <code>false</code>. - /// Managed Service Identity - /// Id - /// Explicit Managed Service - /// Identity Id - /// Identity to use for Key - /// Vault Reference authentication. - /// IP security restrictions for - /// main. - /// IP security restrictions - /// for scm. - /// IP security - /// restrictions for scm to use main. - /// Http20Enabled: configures a web site to - /// allow clients to connect over http2.0 - /// MinTlsVersion: configures the minimum - /// version of TLS required for SSL requests. Possible values include: - /// '1.0', '1.1', '1.2' - /// ScmMinTlsVersion: configures the - /// minimum version of TLS required for SSL requests for SCM site. - /// Possible values include: '1.0', '1.1', '1.2' - /// State of FTP / FTPS service. Possible - /// values include: 'AllAllowed', 'FtpsOnly', 'Disabled' - /// Number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic - /// Plans - /// Maximum number of workers that - /// a site can scale out to. - /// This setting only applies to the Consumption and Elastic Premium - /// Plans - /// Health check path - /// Gets or sets a - /// value indicating whether functions runtime scale monitoring is - /// enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but - /// will instead call to the - /// runtime to get scale status. - /// Sets the time zone a site uses for - /// generating timestamps. Compatible with Linux and Windows App - /// Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence - /// over this config. For Linux, expects tz database values - /// https://www.iana.org/time-zones (for a quick reference see - /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For - /// Windows, expects one of the time zones listed under - /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - /// NT\CurrentVersion\Time Zones - /// Number of minimum - /// instance count for a site - /// This setting only applies to the Elastic Plans - /// List of Azure Storage - /// Accounts. - /// Property to allow or block all - /// public traffic. - public SiteConfigResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? numberOfWorkers = default(int?), IList defaultDocuments = default(IList), string netFrameworkVersion = default(string), string phpVersion = default(string), string pythonVersion = default(string), string nodeVersion = default(string), string powerShellVersion = default(string), string linuxFxVersion = default(string), string windowsFxVersion = default(string), bool? requestTracingEnabled = default(bool?), System.DateTime? requestTracingExpirationTime = default(System.DateTime?), bool? remoteDebuggingEnabled = default(bool?), string remoteDebuggingVersion = default(string), bool? httpLoggingEnabled = default(bool?), bool? acrUseManagedIdentityCreds = default(bool?), string acrUserManagedIdentityID = default(string), int? logsDirectorySizeLimit = default(int?), bool? detailedErrorLoggingEnabled = default(bool?), string publishingUsername = default(string), IList appSettings = default(IList), IList connectionStrings = default(IList), SiteMachineKey machineKey = default(SiteMachineKey), IList handlerMappings = default(IList), string documentRoot = default(string), string scmType = default(string), bool? use32BitWorkerProcess = default(bool?), bool? webSocketsEnabled = default(bool?), bool? alwaysOn = default(bool?), string javaVersion = default(string), string javaContainer = default(string), string javaContainerVersion = default(string), string appCommandLine = default(string), ManagedPipelineMode? managedPipelineMode = default(ManagedPipelineMode?), IList virtualApplications = default(IList), SiteLoadBalancing? loadBalancing = default(SiteLoadBalancing?), Experiments experiments = default(Experiments), SiteLimits limits = default(SiteLimits), bool? autoHealEnabled = default(bool?), AutoHealRules autoHealRules = default(AutoHealRules), string tracingOptions = default(string), string vnetName = default(string), bool? vnetRouteAllEnabled = default(bool?), int? vnetPrivatePortsCount = default(int?), CorsSettings cors = default(CorsSettings), PushSettings push = default(PushSettings), ApiDefinitionInfo apiDefinition = default(ApiDefinitionInfo), ApiManagementConfig apiManagementConfig = default(ApiManagementConfig), string autoSwapSlotName = default(string), bool? localMySqlEnabled = default(bool?), int? managedServiceIdentityId = default(int?), int? xManagedServiceIdentityId = default(int?), string keyVaultReferenceIdentity = default(string), IList ipSecurityRestrictions = default(IList), IList scmIpSecurityRestrictions = default(IList), bool? scmIpSecurityRestrictionsUseMain = default(bool?), bool? http20Enabled = default(bool?), string minTlsVersion = default(string), string scmMinTlsVersion = default(string), string ftpsState = default(string), int? preWarmedInstanceCount = default(int?), int? functionAppScaleLimit = default(int?), string healthCheckPath = default(string), bool? functionsRuntimeScaleMonitoringEnabled = default(bool?), string websiteTimeZone = default(string), int? minimumElasticInstanceCount = default(int?), IDictionary azureStorageAccounts = default(IDictionary), string publicNetworkAccess = default(string)) - : base(id, name, kind, type) - { - NumberOfWorkers = numberOfWorkers; - DefaultDocuments = defaultDocuments; - NetFrameworkVersion = netFrameworkVersion; - PhpVersion = phpVersion; - PythonVersion = pythonVersion; - NodeVersion = nodeVersion; - PowerShellVersion = powerShellVersion; - LinuxFxVersion = linuxFxVersion; - WindowsFxVersion = windowsFxVersion; - RequestTracingEnabled = requestTracingEnabled; - RequestTracingExpirationTime = requestTracingExpirationTime; - RemoteDebuggingEnabled = remoteDebuggingEnabled; - RemoteDebuggingVersion = remoteDebuggingVersion; - HttpLoggingEnabled = httpLoggingEnabled; - AcrUseManagedIdentityCreds = acrUseManagedIdentityCreds; - AcrUserManagedIdentityID = acrUserManagedIdentityID; - LogsDirectorySizeLimit = logsDirectorySizeLimit; - DetailedErrorLoggingEnabled = detailedErrorLoggingEnabled; - PublishingUsername = publishingUsername; - AppSettings = appSettings; - ConnectionStrings = connectionStrings; - MachineKey = machineKey; - HandlerMappings = handlerMappings; - DocumentRoot = documentRoot; - ScmType = scmType; - Use32BitWorkerProcess = use32BitWorkerProcess; - WebSocketsEnabled = webSocketsEnabled; - AlwaysOn = alwaysOn; - JavaVersion = javaVersion; - JavaContainer = javaContainer; - JavaContainerVersion = javaContainerVersion; - AppCommandLine = appCommandLine; - ManagedPipelineMode = managedPipelineMode; - VirtualApplications = virtualApplications; - LoadBalancing = loadBalancing; - Experiments = experiments; - Limits = limits; - AutoHealEnabled = autoHealEnabled; - AutoHealRules = autoHealRules; - TracingOptions = tracingOptions; - VnetName = vnetName; - VnetRouteAllEnabled = vnetRouteAllEnabled; - VnetPrivatePortsCount = vnetPrivatePortsCount; - Cors = cors; - Push = push; - ApiDefinition = apiDefinition; - ApiManagementConfig = apiManagementConfig; - AutoSwapSlotName = autoSwapSlotName; - LocalMySqlEnabled = localMySqlEnabled; - ManagedServiceIdentityId = managedServiceIdentityId; - XManagedServiceIdentityId = xManagedServiceIdentityId; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - IpSecurityRestrictions = ipSecurityRestrictions; - ScmIpSecurityRestrictions = scmIpSecurityRestrictions; - ScmIpSecurityRestrictionsUseMain = scmIpSecurityRestrictionsUseMain; - Http20Enabled = http20Enabled; - MinTlsVersion = minTlsVersion; - ScmMinTlsVersion = scmMinTlsVersion; - FtpsState = ftpsState; - PreWarmedInstanceCount = preWarmedInstanceCount; - FunctionAppScaleLimit = functionAppScaleLimit; - HealthCheckPath = healthCheckPath; - FunctionsRuntimeScaleMonitoringEnabled = functionsRuntimeScaleMonitoringEnabled; - WebsiteTimeZone = websiteTimeZone; - MinimumElasticInstanceCount = minimumElasticInstanceCount; - AzureStorageAccounts = azureStorageAccounts; - PublicNetworkAccess = publicNetworkAccess; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets number of workers. - /// - [JsonProperty(PropertyName = "properties.numberOfWorkers")] - public int? NumberOfWorkers { get; set; } - - /// - /// Gets or sets default documents. - /// - [JsonProperty(PropertyName = "properties.defaultDocuments")] - public IList DefaultDocuments { get; set; } - - /// - /// Gets or sets .NET Framework version. - /// - [JsonProperty(PropertyName = "properties.netFrameworkVersion")] - public string NetFrameworkVersion { get; set; } - - /// - /// Gets or sets version of PHP. - /// - [JsonProperty(PropertyName = "properties.phpVersion")] - public string PhpVersion { get; set; } - - /// - /// Gets or sets version of Python. - /// - [JsonProperty(PropertyName = "properties.pythonVersion")] - public string PythonVersion { get; set; } - - /// - /// Gets or sets version of Node.js. - /// - [JsonProperty(PropertyName = "properties.nodeVersion")] - public string NodeVersion { get; set; } - - /// - /// Gets or sets version of PowerShell. - /// - [JsonProperty(PropertyName = "properties.powerShellVersion")] - public string PowerShellVersion { get; set; } - - /// - /// Gets or sets linux App Framework and version - /// - [JsonProperty(PropertyName = "properties.linuxFxVersion")] - public string LinuxFxVersion { get; set; } - - /// - /// Gets or sets xenon App Framework and version - /// - [JsonProperty(PropertyName = "properties.windowsFxVersion")] - public string WindowsFxVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// request tracing is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.requestTracingEnabled")] - public bool? RequestTracingEnabled { get; set; } - - /// - /// Gets or sets request tracing expiration time. - /// - [JsonProperty(PropertyName = "properties.requestTracingExpirationTime")] - public System.DateTime? RequestTracingExpirationTime { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// remote debugging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.remoteDebuggingEnabled")] - public bool? RemoteDebuggingEnabled { get; set; } - - /// - /// Gets or sets remote debugging version. - /// - [JsonProperty(PropertyName = "properties.remoteDebuggingVersion")] - public string RemoteDebuggingVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if HTTP - /// logging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.httpLoggingEnabled")] - public bool? HttpLoggingEnabled { get; set; } - - /// - /// Gets or sets flag to use Managed Identity Creds for ACR pull - /// - [JsonProperty(PropertyName = "properties.acrUseManagedIdentityCreds")] - public bool? AcrUseManagedIdentityCreds { get; set; } - - /// - /// Gets or sets if using user managed identity, the user managed - /// identity ClientId - /// - [JsonProperty(PropertyName = "properties.acrUserManagedIdentityID")] - public string AcrUserManagedIdentityID { get; set; } - - /// - /// Gets or sets HTTP logs directory size limit. - /// - [JsonProperty(PropertyName = "properties.logsDirectorySizeLimit")] - public int? LogsDirectorySizeLimit { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// detailed error logging is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.detailedErrorLoggingEnabled")] - public bool? DetailedErrorLoggingEnabled { get; set; } - - /// - /// Gets or sets publishing user name. - /// - [JsonProperty(PropertyName = "properties.publishingUsername")] - public string PublishingUsername { get; set; } - - /// - /// Gets or sets application settings. - /// - [JsonProperty(PropertyName = "properties.appSettings")] - public IList AppSettings { get; set; } - - /// - /// Gets or sets connection strings. - /// - [JsonProperty(PropertyName = "properties.connectionStrings")] - public IList ConnectionStrings { get; set; } - - /// - /// Gets site MachineKey. - /// - [JsonProperty(PropertyName = "properties.machineKey")] - public SiteMachineKey MachineKey { get; private set; } - - /// - /// Gets or sets handler mappings. - /// - [JsonProperty(PropertyName = "properties.handlerMappings")] - public IList HandlerMappings { get; set; } - - /// - /// Gets or sets document root. - /// - [JsonProperty(PropertyName = "properties.documentRoot")] - public string DocumentRoot { get; set; } - - /// - /// Gets or sets SCM type. Possible values include: 'None', 'Dropbox', - /// 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', - /// 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', - /// 'OneDrive', 'VSO', 'VSTSRM' - /// - [JsonProperty(PropertyName = "properties.scmType")] - public string ScmType { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to use - /// 32-bit worker process; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.use32BitWorkerProcess")] - public bool? Use32BitWorkerProcess { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// WebSocket is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.webSocketsEnabled")] - public bool? WebSocketsEnabled { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// Always On is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.alwaysOn")] - public bool? AlwaysOn { get; set; } - - /// - /// Gets or sets java version. - /// - [JsonProperty(PropertyName = "properties.javaVersion")] - public string JavaVersion { get; set; } - - /// - /// Gets or sets java container. - /// - [JsonProperty(PropertyName = "properties.javaContainer")] - public string JavaContainer { get; set; } - - /// - /// Gets or sets java container version. - /// - [JsonProperty(PropertyName = "properties.javaContainerVersion")] - public string JavaContainerVersion { get; set; } - - /// - /// Gets or sets app command line to launch. - /// - [JsonProperty(PropertyName = "properties.appCommandLine")] - public string AppCommandLine { get; set; } - - /// - /// Gets or sets managed pipeline mode. Possible values include: - /// 'Integrated', 'Classic' - /// - [JsonProperty(PropertyName = "properties.managedPipelineMode")] - public ManagedPipelineMode? ManagedPipelineMode { get; set; } - - /// - /// Gets or sets virtual applications. - /// - [JsonProperty(PropertyName = "properties.virtualApplications")] - public IList VirtualApplications { get; set; } - - /// - /// Gets or sets site load balancing. Possible values include: - /// 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', - /// 'WeightedTotalTraffic', 'RequestHash', 'PerSiteRoundRobin' - /// - [JsonProperty(PropertyName = "properties.loadBalancing")] - public SiteLoadBalancing? LoadBalancing { get; set; } - - /// - /// Gets or sets this is work around for polymorphic types. - /// - [JsonProperty(PropertyName = "properties.experiments")] - public Experiments Experiments { get; set; } - - /// - /// Gets or sets site limits. - /// - [JsonProperty(PropertyName = "properties.limits")] - public SiteLimits Limits { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if Auto - /// Heal is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.autoHealEnabled")] - public bool? AutoHealEnabled { get; set; } - - /// - /// Gets or sets auto Heal rules. - /// - [JsonProperty(PropertyName = "properties.autoHealRules")] - public AutoHealRules AutoHealRules { get; set; } - - /// - /// Gets or sets tracing options. - /// - [JsonProperty(PropertyName = "properties.tracingOptions")] - public string TracingOptions { get; set; } - - /// - /// Gets or sets virtual Network name. - /// - [JsonProperty(PropertyName = "properties.vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets virtual Network Route All enabled. This causes all - /// outbound traffic to have Virtual Network Security Groups and User - /// Defined Routes applied. - /// - [JsonProperty(PropertyName = "properties.vnetRouteAllEnabled")] - public bool? VnetRouteAllEnabled { get; set; } - - /// - /// Gets or sets the number of private ports assigned to this app. - /// These will be assigned dynamically on runtime. - /// - [JsonProperty(PropertyName = "properties.vnetPrivatePortsCount")] - public int? VnetPrivatePortsCount { get; set; } - - /// - /// Gets or sets cross-Origin Resource Sharing (CORS) settings. - /// - [JsonProperty(PropertyName = "properties.cors")] - public CorsSettings Cors { get; set; } - - /// - /// Gets or sets push endpoint settings. - /// - [JsonProperty(PropertyName = "properties.push")] - public PushSettings Push { get; set; } - - /// - /// Gets or sets information about the formal API definition for the - /// app. - /// - [JsonProperty(PropertyName = "properties.apiDefinition")] - public ApiDefinitionInfo ApiDefinition { get; set; } - - /// - /// Gets or sets azure API management settings linked to the app. - /// - [JsonProperty(PropertyName = "properties.apiManagementConfig")] - public ApiManagementConfig ApiManagementConfig { get; set; } - - /// - /// Gets or sets auto-swap slot name. - /// - [JsonProperty(PropertyName = "properties.autoSwapSlotName")] - public string AutoSwapSlotName { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable local MySQL; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.localMySqlEnabled")] - public bool? LocalMySqlEnabled { get; set; } - - /// - /// Gets or sets managed Service Identity Id - /// - [JsonProperty(PropertyName = "properties.managedServiceIdentityId")] - public int? ManagedServiceIdentityId { get; set; } - - /// - /// Gets or sets explicit Managed Service Identity Id - /// - [JsonProperty(PropertyName = "properties.xManagedServiceIdentityId")] - public int? XManagedServiceIdentityId { get; set; } - - /// - /// Gets or sets identity to use for Key Vault Reference - /// authentication. - /// - [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; set; } - - /// - /// Gets or sets IP security restrictions for main. - /// - [JsonProperty(PropertyName = "properties.ipSecurityRestrictions")] - public IList IpSecurityRestrictions { get; set; } - - /// - /// Gets or sets IP security restrictions for scm. - /// - [JsonProperty(PropertyName = "properties.scmIpSecurityRestrictions")] - public IList ScmIpSecurityRestrictions { get; set; } - - /// - /// Gets or sets IP security restrictions for scm to use main. - /// - [JsonProperty(PropertyName = "properties.scmIpSecurityRestrictionsUseMain")] - public bool? ScmIpSecurityRestrictionsUseMain { get; set; } - - /// - /// Gets or sets http20Enabled: configures a web site to allow clients - /// to connect over http2.0 - /// - [JsonProperty(PropertyName = "properties.http20Enabled")] - public bool? Http20Enabled { get; set; } - - /// - /// Gets or sets minTlsVersion: configures the minimum version of TLS - /// required for SSL requests. Possible values include: '1.0', '1.1', - /// '1.2' - /// - [JsonProperty(PropertyName = "properties.minTlsVersion")] - public string MinTlsVersion { get; set; } - - /// - /// Gets or sets scmMinTlsVersion: configures the minimum version of - /// TLS required for SSL requests for SCM site. Possible values - /// include: '1.0', '1.1', '1.2' - /// - [JsonProperty(PropertyName = "properties.scmMinTlsVersion")] - public string ScmMinTlsVersion { get; set; } - - /// - /// Gets or sets state of FTP / FTPS service. Possible values include: - /// 'AllAllowed', 'FtpsOnly', 'Disabled' - /// - [JsonProperty(PropertyName = "properties.ftpsState")] - public string FtpsState { get; set; } - - /// - /// Gets or sets number of preWarmed instances. - /// This setting only applies to the Consumption and Elastic Plans - /// - [JsonProperty(PropertyName = "properties.preWarmedInstanceCount")] - public int? PreWarmedInstanceCount { get; set; } - - /// - /// Gets or sets maximum number of workers that a site can scale out - /// to. - /// This setting only applies to the Consumption and Elastic Premium - /// Plans - /// - [JsonProperty(PropertyName = "properties.functionAppScaleLimit")] - public int? FunctionAppScaleLimit { get; set; } - - /// - /// Gets or sets health check path - /// - [JsonProperty(PropertyName = "properties.healthCheckPath")] - public string HealthCheckPath { get; set; } - - /// - /// Gets or sets a value indicating whether functions runtime scale - /// monitoring is enabled. When enabled, - /// the ScaleController will not monitor event sources directly, but - /// will instead call to the - /// runtime to get scale status. - /// - [JsonProperty(PropertyName = "properties.functionsRuntimeScaleMonitoringEnabled")] - public bool? FunctionsRuntimeScaleMonitoringEnabled { get; set; } - - /// - /// Gets or sets sets the time zone a site uses for generating - /// timestamps. Compatible with Linux and Windows App Service. Setting - /// the WEBSITE_TIME_ZONE app setting takes precedence over this - /// config. For Linux, expects tz database values - /// https://www.iana.org/time-zones (for a quick reference see - /// https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For - /// Windows, expects one of the time zones listed under - /// HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows - /// NT\CurrentVersion\Time Zones - /// - [JsonProperty(PropertyName = "properties.websiteTimeZone")] - public string WebsiteTimeZone { get; set; } - - /// - /// Gets or sets number of minimum instance count for a site - /// This setting only applies to the Elastic Plans - /// - [JsonProperty(PropertyName = "properties.minimumElasticInstanceCount")] - public int? MinimumElasticInstanceCount { get; set; } - - /// - /// Gets or sets list of Azure Storage Accounts. - /// - [JsonProperty(PropertyName = "properties.azureStorageAccounts")] - public IDictionary AzureStorageAccounts { get; set; } - - /// - /// Gets or sets property to allow or block all public traffic. - /// - [JsonProperty(PropertyName = "properties.publicNetworkAccess")] - public string PublicNetworkAccess { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Push != null) - { - Push.Validate(); - } - if (PreWarmedInstanceCount > 10) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PreWarmedInstanceCount", 10); - } - if (PreWarmedInstanceCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "PreWarmedInstanceCount", 0); - } - if (FunctionAppScaleLimit < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "FunctionAppScaleLimit", 0); - } - if (MinimumElasticInstanceCount > 20) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "MinimumElasticInstanceCount", 20); - } - if (MinimumElasticInstanceCount < 0) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "MinimumElasticInstanceCount", 0); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigurationSnapshotInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigurationSnapshotInfo.cs deleted file mode 100644 index 8223f04b14fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteConfigurationSnapshotInfo.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A snapshot of a web app configuration. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteConfigurationSnapshotInfo : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteConfigurationSnapshotInfo - /// class. - /// - public SiteConfigurationSnapshotInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteConfigurationSnapshotInfo - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The time the snapshot was taken. - /// The id of the snapshot - public SiteConfigurationSnapshotInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), System.DateTime? time = default(System.DateTime?), int? snapshotId = default(int?)) - : base(id, name, kind, type) - { - Time = time; - SnapshotId = snapshotId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the time the snapshot was taken. - /// - [JsonProperty(PropertyName = "properties.time")] - public System.DateTime? Time { get; private set; } - - /// - /// Gets the id of the snapshot - /// - [JsonProperty(PropertyName = "properties.snapshotId")] - public int? SnapshotId { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionInfo.cs deleted file mode 100644 index e7a3772cee59..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionInfo.cs +++ /dev/null @@ -1,218 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Site Extension Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteExtensionInfo : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteExtensionInfo class. - /// - public SiteExtensionInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteExtensionInfo class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Site extension ID. - /// Site extension type. Possible values - /// include: 'Gallery', 'WebRoot' - /// Summary description. - /// Detailed description. - /// Version information. - /// Extension URL. - /// Project URL. - /// Icon URL. - /// License URL. - /// Feed URL. - /// List of authors. - /// Installer command line - /// parameters. - /// Published timestamp. - /// Count of downloads. - /// <code>true</code> if - /// the local version is the latest version; - /// <code>false</code> otherwise. - /// Local path. - /// Installed timestamp. - /// Provisioning state. - /// Site Extension comment. - public SiteExtensionInfo(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string extensionId = default(string), string title = default(string), SiteExtensionType? extensionType = default(SiteExtensionType?), string summary = default(string), string description = default(string), string version = default(string), string extensionUrl = default(string), string projectUrl = default(string), string iconUrl = default(string), string licenseUrl = default(string), string feedUrl = default(string), IList authors = default(IList), string installerCommandLineParams = default(string), System.DateTime? publishedDateTime = default(System.DateTime?), int? downloadCount = default(int?), bool? localIsLatestVersion = default(bool?), string localPath = default(string), System.DateTime? installedDateTime = default(System.DateTime?), string provisioningState = default(string), string comment = default(string)) - : base(id, name, kind, type) - { - ExtensionId = extensionId; - Title = title; - ExtensionType = extensionType; - Summary = summary; - Description = description; - Version = version; - ExtensionUrl = extensionUrl; - ProjectUrl = projectUrl; - IconUrl = iconUrl; - LicenseUrl = licenseUrl; - FeedUrl = feedUrl; - Authors = authors; - InstallerCommandLineParams = installerCommandLineParams; - PublishedDateTime = publishedDateTime; - DownloadCount = downloadCount; - LocalIsLatestVersion = localIsLatestVersion; - LocalPath = localPath; - InstalledDateTime = installedDateTime; - ProvisioningState = provisioningState; - Comment = comment; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets site extension ID. - /// - [JsonProperty(PropertyName = "properties.extension_id")] - public string ExtensionId { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.title")] - public string Title { get; set; } - - /// - /// Gets or sets site extension type. Possible values include: - /// 'Gallery', 'WebRoot' - /// - [JsonProperty(PropertyName = "properties.extension_type")] - public SiteExtensionType? ExtensionType { get; set; } - - /// - /// Gets or sets summary description. - /// - [JsonProperty(PropertyName = "properties.summary")] - public string Summary { get; set; } - - /// - /// Gets or sets detailed description. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; set; } - - /// - /// Gets or sets version information. - /// - [JsonProperty(PropertyName = "properties.version")] - public string Version { get; set; } - - /// - /// Gets or sets extension URL. - /// - [JsonProperty(PropertyName = "properties.extension_url")] - public string ExtensionUrl { get; set; } - - /// - /// Gets or sets project URL. - /// - [JsonProperty(PropertyName = "properties.project_url")] - public string ProjectUrl { get; set; } - - /// - /// Gets or sets icon URL. - /// - [JsonProperty(PropertyName = "properties.icon_url")] - public string IconUrl { get; set; } - - /// - /// Gets or sets license URL. - /// - [JsonProperty(PropertyName = "properties.license_url")] - public string LicenseUrl { get; set; } - - /// - /// Gets or sets feed URL. - /// - [JsonProperty(PropertyName = "properties.feed_url")] - public string FeedUrl { get; set; } - - /// - /// Gets or sets list of authors. - /// - [JsonProperty(PropertyName = "properties.authors")] - public IList Authors { get; set; } - - /// - /// Gets or sets installer command line parameters. - /// - [JsonProperty(PropertyName = "properties.installer_command_line_params")] - public string InstallerCommandLineParams { get; set; } - - /// - /// Gets or sets published timestamp. - /// - [JsonProperty(PropertyName = "properties.published_date_time")] - public System.DateTime? PublishedDateTime { get; set; } - - /// - /// Gets or sets count of downloads. - /// - [JsonProperty(PropertyName = "properties.download_count")] - public int? DownloadCount { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// local version is the latest version; - /// &lt;code&gt;false&lt;/code&gt; otherwise. - /// - [JsonProperty(PropertyName = "properties.local_is_latest_version")] - public bool? LocalIsLatestVersion { get; set; } - - /// - /// Gets or sets local path. - /// - [JsonProperty(PropertyName = "properties.local_path")] - public string LocalPath { get; set; } - - /// - /// Gets or sets installed timestamp. - /// - [JsonProperty(PropertyName = "properties.installed_date_time")] - public System.DateTime? InstalledDateTime { get; set; } - - /// - /// Gets or sets provisioning state. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; set; } - - /// - /// Gets or sets site Extension comment. - /// - [JsonProperty(PropertyName = "properties.comment")] - public string Comment { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionType.cs deleted file mode 100644 index 70c406c4d640..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteExtensionType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SiteExtensionType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SiteExtensionType - { - [EnumMember(Value = "Gallery")] - Gallery, - [EnumMember(Value = "WebRoot")] - WebRoot - } - internal static class SiteExtensionTypeEnumExtension - { - internal static string ToSerializedValue(this SiteExtensionType? value) - { - return value == null ? null : ((SiteExtensionType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SiteExtensionType value) - { - switch( value ) - { - case SiteExtensionType.Gallery: - return "Gallery"; - case SiteExtensionType.WebRoot: - return "WebRoot"; - } - return null; - } - - internal static SiteExtensionType? ParseSiteExtensionType(this string value) - { - switch( value ) - { - case "Gallery": - return SiteExtensionType.Gallery; - case "WebRoot": - return SiteExtensionType.WebRoot; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLimits.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLimits.cs deleted file mode 100644 index 384ed21eb59f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLimits.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Metric limits set on an app. - /// - public partial class SiteLimits - { - /// - /// Initializes a new instance of the SiteLimits class. - /// - public SiteLimits() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteLimits class. - /// - /// Maximum allowed CPU usage - /// percentage. - /// Maximum allowed memory usage in - /// MB. - /// Maximum allowed disk size usage in - /// MB. - public SiteLimits(double? maxPercentageCpu = default(double?), long? maxMemoryInMb = default(long?), long? maxDiskSizeInMb = default(long?)) - { - MaxPercentageCpu = maxPercentageCpu; - MaxMemoryInMb = maxMemoryInMb; - MaxDiskSizeInMb = maxDiskSizeInMb; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets maximum allowed CPU usage percentage. - /// - [JsonProperty(PropertyName = "maxPercentageCpu")] - public double? MaxPercentageCpu { get; set; } - - /// - /// Gets or sets maximum allowed memory usage in MB. - /// - [JsonProperty(PropertyName = "maxMemoryInMb")] - public long? MaxMemoryInMb { get; set; } - - /// - /// Gets or sets maximum allowed disk size usage in MB. - /// - [JsonProperty(PropertyName = "maxDiskSizeInMb")] - public long? MaxDiskSizeInMb { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs deleted file mode 100644 index 8b93ae4f1798..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLoadBalancing.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SiteLoadBalancing. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SiteLoadBalancing - { - [EnumMember(Value = "WeightedRoundRobin")] - WeightedRoundRobin, - [EnumMember(Value = "LeastRequests")] - LeastRequests, - [EnumMember(Value = "LeastResponseTime")] - LeastResponseTime, - [EnumMember(Value = "WeightedTotalTraffic")] - WeightedTotalTraffic, - [EnumMember(Value = "RequestHash")] - RequestHash, - [EnumMember(Value = "PerSiteRoundRobin")] - PerSiteRoundRobin - } - internal static class SiteLoadBalancingEnumExtension - { - internal static string ToSerializedValue(this SiteLoadBalancing? value) - { - return value == null ? null : ((SiteLoadBalancing)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SiteLoadBalancing value) - { - switch( value ) - { - case SiteLoadBalancing.WeightedRoundRobin: - return "WeightedRoundRobin"; - case SiteLoadBalancing.LeastRequests: - return "LeastRequests"; - case SiteLoadBalancing.LeastResponseTime: - return "LeastResponseTime"; - case SiteLoadBalancing.WeightedTotalTraffic: - return "WeightedTotalTraffic"; - case SiteLoadBalancing.RequestHash: - return "RequestHash"; - case SiteLoadBalancing.PerSiteRoundRobin: - return "PerSiteRoundRobin"; - } - return null; - } - - internal static SiteLoadBalancing? ParseSiteLoadBalancing(this string value) - { - switch( value ) - { - case "WeightedRoundRobin": - return SiteLoadBalancing.WeightedRoundRobin; - case "LeastRequests": - return SiteLoadBalancing.LeastRequests; - case "LeastResponseTime": - return SiteLoadBalancing.LeastResponseTime; - case "WeightedTotalTraffic": - return SiteLoadBalancing.WeightedTotalTraffic; - case "RequestHash": - return SiteLoadBalancing.RequestHash; - case "PerSiteRoundRobin": - return SiteLoadBalancing.PerSiteRoundRobin; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLogsConfig.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLogsConfig.cs deleted file mode 100644 index 79c82b86b0e1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteLogsConfig.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Configuration of App Service site logs. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteLogsConfig : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteLogsConfig class. - /// - public SiteLogsConfig() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteLogsConfig class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Application logs - /// configuration. - /// HTTP logs configuration. - /// Failed requests tracing - /// configuration. - /// Detailed error messages - /// configuration. - public SiteLogsConfig(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), ApplicationLogsConfig applicationLogs = default(ApplicationLogsConfig), HttpLogsConfig httpLogs = default(HttpLogsConfig), EnabledConfig failedRequestsTracing = default(EnabledConfig), EnabledConfig detailedErrorMessages = default(EnabledConfig)) - : base(id, name, kind, type) - { - ApplicationLogs = applicationLogs; - HttpLogs = httpLogs; - FailedRequestsTracing = failedRequestsTracing; - DetailedErrorMessages = detailedErrorMessages; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application logs configuration. - /// - [JsonProperty(PropertyName = "properties.applicationLogs")] - public ApplicationLogsConfig ApplicationLogs { get; set; } - - /// - /// Gets or sets HTTP logs configuration. - /// - [JsonProperty(PropertyName = "properties.httpLogs")] - public HttpLogsConfig HttpLogs { get; set; } - - /// - /// Gets or sets failed requests tracing configuration. - /// - [JsonProperty(PropertyName = "properties.failedRequestsTracing")] - public EnabledConfig FailedRequestsTracing { get; set; } - - /// - /// Gets or sets detailed error messages configuration. - /// - [JsonProperty(PropertyName = "properties.detailedErrorMessages")] - public EnabledConfig DetailedErrorMessages { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (ApplicationLogs != null) - { - ApplicationLogs.Validate(); - } - if (HttpLogs != null) - { - HttpLogs.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteMachineKey.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteMachineKey.cs deleted file mode 100644 index 5e6f9dc351cd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteMachineKey.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// MachineKey of an app. - /// - public partial class SiteMachineKey - { - /// - /// Initializes a new instance of the SiteMachineKey class. - /// - public SiteMachineKey() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteMachineKey class. - /// - /// MachineKey validation. - /// Validation key. - /// Algorithm used for decryption. - /// Decryption key. - public SiteMachineKey(string validation = default(string), string validationKey = default(string), string decryption = default(string), string decryptionKey = default(string)) - { - Validation = validation; - ValidationKey = validationKey; - Decryption = decryption; - DecryptionKey = decryptionKey; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets machineKey validation. - /// - [JsonProperty(PropertyName = "validation")] - public string Validation { get; set; } - - /// - /// Gets or sets validation key. - /// - [JsonProperty(PropertyName = "validationKey")] - public string ValidationKey { get; set; } - - /// - /// Gets or sets algorithm used for decryption. - /// - [JsonProperty(PropertyName = "decryption")] - public string Decryption { get; set; } - - /// - /// Gets or sets decryption key. - /// - [JsonProperty(PropertyName = "decryptionKey")] - public string DecryptionKey { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs deleted file mode 100644 index 9d1f55080f11..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePatchResource.cs +++ /dev/null @@ -1,530 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a site. - /// - [Rest.Serialization.JsonTransformation] - public partial class SitePatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SitePatchResource class. - /// - public SitePatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SitePatchResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Current state of the app. - /// Hostnames associated with the app. - /// Name of the repository - /// site. - /// State indicating whether the app has - /// exceeded its quota usage. Read-only. Possible values include: - /// 'Normal', 'Exceeded' - /// <code>true</code> if the app is - /// enabled; otherwise, <code>false</code>. Setting this - /// value to false disables the app (takes the app offline). - /// Enabled hostnames for the - /// app.Hostnames need to be assigned (see HostNames) AND enabled. - /// Otherwise, - /// the app is not served on those hostnames. - /// Management information availability - /// state for the app. Possible values include: 'Normal', 'Limited', - /// 'DisasterRecoveryMode' - /// Hostname SSL states are used to - /// manage the SSL bindings for app's hostnames. - /// Resource ID of the associated App - /// Service plan, formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// <code>true</code> if reserved; - /// otherwise, <code>false</code>. - /// Obsolete: Hyper-V sandbox. - /// Hyper-V sandbox. - /// Last time the app was modified, - /// in UTC. Read-only. - /// Configuration of the app. - /// Azure Traffic Manager - /// hostnames associated with the app. Read-only. - /// <code>true</code> to - /// stop SCM (KUDU) site when the app is stopped; otherwise, - /// <code>false</code>. The default is - /// <code>false</code>. - /// Specifies which deployment slot this - /// app will swap into. Read-only. - /// App Service Environment to - /// use for the app. - /// <code>true</code> - /// to enable client affinity; <code>false</code> to stop - /// sending session affinity cookies, which route client requests in - /// the same session to the same instance. Default is - /// <code>true</code>. - /// <code>true</code> to - /// enable client certificate authentication (TLS mutual - /// authentication); otherwise, <code>false</code>. Default - /// is <code>false</code>. - /// This composes with ClientCertEnabled - /// setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means - /// ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means - /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional', 'OptionalInteractiveUser' - /// client certificate - /// authentication comma-separated exclusion paths - /// <code>true</code> to - /// disable the public hostnames of the app; otherwise, - /// <code>false</code>. - /// If <code>true</code>, the app is only accessible via - /// API management process. - /// Unique identifier that - /// verifies the custom domains assigned to the app. Customer will add - /// this id to a txt record for verification. - /// List of IP addresses that the app - /// uses for outbound connections (e.g. database access). Includes VIPs - /// from tenants that site can be hosted with current settings. - /// Read-only. - /// List of IP addresses that - /// the app uses for outbound connections (e.g. database access). - /// Includes VIPs from all tenants except dataComponent. - /// Read-only. - /// Size of the function container. - /// Maximum allowed daily - /// memory-time quota (applicable on dynamic apps only). - /// App suspended till in case memory-time - /// quota is exceeded. - /// Maximum number of workers. - /// This only applies to Functions container. - /// If specified during app creation, the app - /// is cloned from a source app. - /// Name of the resource group the app - /// belongs to. Read-only. - /// <code>true</code> if - /// the app is a default container; otherwise, - /// <code>false</code>. - /// Default hostname of the app. - /// Read-only. - /// Status of the last deployment slot - /// swap operation. - /// HttpsOnly: configures a web site to accept - /// only https requests. Issues redirect for - /// http requests - /// Site redundancy mode. Possible values - /// include: 'None', 'Manual', 'Failover', 'ActiveActive', - /// 'GeoRedundant' - /// Specifies an operation id if - /// this site has a pending operation. - /// Checks if Customer provided - /// storage account is required - /// Identity to use for Key - /// Vault Reference authentication. - /// Azure Resource Manager ID of - /// the Virtual network and subnet to be joined by Regional VNET - /// Integration. - /// This must be of the form - /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - public SitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string state = default(string), IList hostNames = default(IList), string repositorySiteName = default(string), UsageState? usageState = default(UsageState?), bool? enabled = default(bool?), IList enabledHostNames = default(IList), SiteAvailabilityState? availabilityState = default(SiteAvailabilityState?), IList hostNameSslStates = default(IList), string serverFarmId = default(string), bool? reserved = default(bool?), bool? isXenon = default(bool?), bool? hyperV = default(bool?), System.DateTime? lastModifiedTimeUtc = default(System.DateTime?), SiteConfig siteConfig = default(SiteConfig), IList trafficManagerHostNames = default(IList), bool? scmSiteAlsoStopped = default(bool?), string targetSwapSlot = default(string), HostingEnvironmentProfile hostingEnvironmentProfile = default(HostingEnvironmentProfile), bool? clientAffinityEnabled = default(bool?), bool? clientCertEnabled = default(bool?), ClientCertMode? clientCertMode = default(ClientCertMode?), string clientCertExclusionPaths = default(string), bool? hostNamesDisabled = default(bool?), string customDomainVerificationId = default(string), string outboundIpAddresses = default(string), string possibleOutboundIpAddresses = default(string), int? containerSize = default(int?), int? dailyMemoryTimeQuota = default(int?), System.DateTime? suspendedTill = default(System.DateTime?), int? maxNumberOfWorkers = default(int?), CloningInfo cloningInfo = default(CloningInfo), string resourceGroup = default(string), bool? isDefaultContainer = default(bool?), string defaultHostName = default(string), SlotSwapStatus slotSwapStatus = default(SlotSwapStatus), bool? httpsOnly = default(bool?), RedundancyMode? redundancyMode = default(RedundancyMode?), System.Guid? inProgressOperationId = default(System.Guid?), bool? storageAccountRequired = default(bool?), string keyVaultReferenceIdentity = default(string), string virtualNetworkSubnetId = default(string), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) - : base(id, name, kind, type) - { - State = state; - HostNames = hostNames; - RepositorySiteName = repositorySiteName; - UsageState = usageState; - Enabled = enabled; - EnabledHostNames = enabledHostNames; - AvailabilityState = availabilityState; - HostNameSslStates = hostNameSslStates; - ServerFarmId = serverFarmId; - Reserved = reserved; - IsXenon = isXenon; - HyperV = hyperV; - LastModifiedTimeUtc = lastModifiedTimeUtc; - SiteConfig = siteConfig; - TrafficManagerHostNames = trafficManagerHostNames; - ScmSiteAlsoStopped = scmSiteAlsoStopped; - TargetSwapSlot = targetSwapSlot; - HostingEnvironmentProfile = hostingEnvironmentProfile; - ClientAffinityEnabled = clientAffinityEnabled; - ClientCertEnabled = clientCertEnabled; - ClientCertMode = clientCertMode; - ClientCertExclusionPaths = clientCertExclusionPaths; - HostNamesDisabled = hostNamesDisabled; - CustomDomainVerificationId = customDomainVerificationId; - OutboundIpAddresses = outboundIpAddresses; - PossibleOutboundIpAddresses = possibleOutboundIpAddresses; - ContainerSize = containerSize; - DailyMemoryTimeQuota = dailyMemoryTimeQuota; - SuspendedTill = suspendedTill; - MaxNumberOfWorkers = maxNumberOfWorkers; - CloningInfo = cloningInfo; - ResourceGroup = resourceGroup; - IsDefaultContainer = isDefaultContainer; - DefaultHostName = defaultHostName; - SlotSwapStatus = slotSwapStatus; - HttpsOnly = httpsOnly; - RedundancyMode = redundancyMode; - InProgressOperationId = inProgressOperationId; - StorageAccountRequired = storageAccountRequired; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - VirtualNetworkSubnetId = virtualNetworkSubnetId; - Identity = identity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets current state of the app. - /// - [JsonProperty(PropertyName = "properties.state")] - public string State { get; private set; } - - /// - /// Gets hostnames associated with the app. - /// - [JsonProperty(PropertyName = "properties.hostNames")] - public IList HostNames { get; private set; } - - /// - /// Gets name of the repository site. - /// - [JsonProperty(PropertyName = "properties.repositorySiteName")] - public string RepositorySiteName { get; private set; } - - /// - /// Gets state indicating whether the app has exceeded its quota usage. - /// Read-only. Possible values include: 'Normal', 'Exceeded' - /// - [JsonProperty(PropertyName = "properties.usageState")] - public UsageState? UsageState { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// app is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. Setting this value - /// to false disables the app (takes the app offline). - /// - [JsonProperty(PropertyName = "properties.enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets enabled hostnames for the app.Hostnames need to be assigned - /// (see HostNames) AND enabled. Otherwise, - /// the app is not served on those hostnames. - /// - [JsonProperty(PropertyName = "properties.enabledHostNames")] - public IList EnabledHostNames { get; private set; } - - /// - /// Gets management information availability state for the app. - /// Possible values include: 'Normal', 'Limited', - /// 'DisasterRecoveryMode' - /// - [JsonProperty(PropertyName = "properties.availabilityState")] - public SiteAvailabilityState? AvailabilityState { get; private set; } - - /// - /// Gets or sets hostname SSL states are used to manage the SSL - /// bindings for app's hostnames. - /// - [JsonProperty(PropertyName = "properties.hostNameSslStates")] - public IList HostNameSslStates { get; set; } - - /// - /// Gets or sets resource ID of the associated App Service plan, - /// formatted as: - /// "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - /// - [JsonProperty(PropertyName = "properties.serverFarmId")] - public string ServerFarmId { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// reserved; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.reserved")] - public bool? Reserved { get; set; } - - /// - /// Gets or sets obsolete: Hyper-V sandbox. - /// - [JsonProperty(PropertyName = "properties.isXenon")] - public bool? IsXenon { get; set; } - - /// - /// Gets or sets hyper-V sandbox. - /// - [JsonProperty(PropertyName = "properties.hyperV")] - public bool? HyperV { get; set; } - - /// - /// Gets last time the app was modified, in UTC. Read-only. - /// - [JsonProperty(PropertyName = "properties.lastModifiedTimeUtc")] - public System.DateTime? LastModifiedTimeUtc { get; private set; } - - /// - /// Gets or sets configuration of the app. - /// - [JsonProperty(PropertyName = "properties.siteConfig")] - public SiteConfig SiteConfig { get; set; } - - /// - /// Gets azure Traffic Manager hostnames associated with the app. - /// Read-only. - /// - [JsonProperty(PropertyName = "properties.trafficManagerHostNames")] - public IList TrafficManagerHostNames { get; private set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to stop - /// SCM (KUDU) site when the app is stopped; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. The default is - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.scmSiteAlsoStopped")] - public bool? ScmSiteAlsoStopped { get; set; } - - /// - /// Gets specifies which deployment slot this app will swap into. - /// Read-only. - /// - [JsonProperty(PropertyName = "properties.targetSwapSlot")] - public string TargetSwapSlot { get; private set; } - - /// - /// Gets or sets app Service Environment to use for the app. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironmentProfile")] - public HostingEnvironmentProfile HostingEnvironmentProfile { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable client affinity; - /// &lt;code&gt;false&lt;/code&gt; to stop sending - /// session affinity cookies, which route client requests in the same - /// session to the same instance. Default is - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.clientAffinityEnabled")] - public bool? ClientAffinityEnabled { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable client certificate authentication (TLS mutual - /// authentication); otherwise, - /// &lt;code&gt;false&lt;/code&gt;. Default is - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.clientCertEnabled")] - public bool? ClientCertEnabled { get; set; } - - /// - /// Gets or sets this composes with ClientCertEnabled setting. - /// - ClientCertEnabled: false means ClientCert is ignored. - /// - ClientCertEnabled: true and ClientCertMode: Required means - /// ClientCert is required. - /// - ClientCertEnabled: true and ClientCertMode: Optional means - /// ClientCert is optional or accepted. Possible values include: - /// 'Required', 'Optional', 'OptionalInteractiveUser' - /// - [JsonProperty(PropertyName = "properties.clientCertMode")] - public ClientCertMode? ClientCertMode { get; set; } - - /// - /// Gets or sets client certificate authentication comma-separated - /// exclusion paths - /// - [JsonProperty(PropertyName = "properties.clientCertExclusionPaths")] - public string ClientCertExclusionPaths { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// disable the public hostnames of the app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// If &lt;code&gt;true&lt;/code&gt;, the app is only - /// accessible via API management process. - /// - [JsonProperty(PropertyName = "properties.hostNamesDisabled")] - public bool? HostNamesDisabled { get; set; } - - /// - /// Gets or sets unique identifier that verifies the custom domains - /// assigned to the app. Customer will add this id to a txt record for - /// verification. - /// - [JsonProperty(PropertyName = "properties.customDomainVerificationId")] - public string CustomDomainVerificationId { get; set; } - - /// - /// Gets list of IP addresses that the app uses for outbound - /// connections (e.g. database access). Includes VIPs from tenants that - /// site can be hosted with current settings. Read-only. - /// - [JsonProperty(PropertyName = "properties.outboundIpAddresses")] - public string OutboundIpAddresses { get; private set; } - - /// - /// Gets list of IP addresses that the app uses for outbound - /// connections (e.g. database access). Includes VIPs from all tenants - /// except dataComponent. Read-only. - /// - [JsonProperty(PropertyName = "properties.possibleOutboundIpAddresses")] - public string PossibleOutboundIpAddresses { get; private set; } - - /// - /// Gets or sets size of the function container. - /// - [JsonProperty(PropertyName = "properties.containerSize")] - public int? ContainerSize { get; set; } - - /// - /// Gets or sets maximum allowed daily memory-time quota (applicable on - /// dynamic apps only). - /// - [JsonProperty(PropertyName = "properties.dailyMemoryTimeQuota")] - public int? DailyMemoryTimeQuota { get; set; } - - /// - /// Gets app suspended till in case memory-time quota is exceeded. - /// - [JsonProperty(PropertyName = "properties.suspendedTill")] - public System.DateTime? SuspendedTill { get; private set; } - - /// - /// Gets maximum number of workers. - /// This only applies to Functions container. - /// - [JsonProperty(PropertyName = "properties.maxNumberOfWorkers")] - public int? MaxNumberOfWorkers { get; private set; } - - /// - /// Gets or sets if specified during app creation, the app is cloned - /// from a source app. - /// - [JsonProperty(PropertyName = "properties.cloningInfo")] - public CloningInfo CloningInfo { get; set; } - - /// - /// Gets name of the resource group the app belongs to. Read-only. - /// - [JsonProperty(PropertyName = "properties.resourceGroup")] - public string ResourceGroup { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the app is a - /// default container; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isDefaultContainer")] - public bool? IsDefaultContainer { get; private set; } - - /// - /// Gets default hostname of the app. Read-only. - /// - [JsonProperty(PropertyName = "properties.defaultHostName")] - public string DefaultHostName { get; private set; } - - /// - /// Gets status of the last deployment slot swap operation. - /// - [JsonProperty(PropertyName = "properties.slotSwapStatus")] - public SlotSwapStatus SlotSwapStatus { get; private set; } - - /// - /// Gets or sets httpsOnly: configures a web site to accept only https - /// requests. Issues redirect for - /// http requests - /// - [JsonProperty(PropertyName = "properties.httpsOnly")] - public bool? HttpsOnly { get; set; } - - /// - /// Gets or sets site redundancy mode. Possible values include: 'None', - /// 'Manual', 'Failover', 'ActiveActive', 'GeoRedundant' - /// - [JsonProperty(PropertyName = "properties.redundancyMode")] - public RedundancyMode? RedundancyMode { get; set; } - - /// - /// Gets specifies an operation id if this site has a pending - /// operation. - /// - [JsonProperty(PropertyName = "properties.inProgressOperationId")] - public System.Guid? InProgressOperationId { get; private set; } - - /// - /// Gets or sets checks if Customer provided storage account is - /// required - /// - [JsonProperty(PropertyName = "properties.storageAccountRequired")] - public bool? StorageAccountRequired { get; set; } - - /// - /// Gets or sets identity to use for Key Vault Reference - /// authentication. - /// - [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; set; } - - /// - /// Gets or sets azure Resource Manager ID of the Virtual network and - /// subnet to be joined by Regional VNET Integration. - /// This must be of the form - /// /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName} - /// - [JsonProperty(PropertyName = "properties.virtualNetworkSubnetId")] - public string VirtualNetworkSubnetId { get; set; } - - /// - /// - [JsonProperty(PropertyName = "identity")] - public ManagedServiceIdentity Identity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (SiteConfig != null) - { - SiteConfig.Validate(); - } - if (CloningInfo != null) - { - CloningInfo.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePhpErrorLogFlag.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePhpErrorLogFlag.cs deleted file mode 100644 index 8d7fc1abb334..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SitePhpErrorLogFlag.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Used for getting PHP error logging flag. - /// - [Rest.Serialization.JsonTransformation] - public partial class SitePhpErrorLogFlag : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SitePhpErrorLogFlag class. - /// - public SitePhpErrorLogFlag() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SitePhpErrorLogFlag class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Local log_errors setting. - /// Master log_errors setting. - /// Local log_errors_max_len - /// setting. - /// Master log_errors_max_len - /// setting. - public SitePhpErrorLogFlag(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string localLogErrors = default(string), string masterLogErrors = default(string), string localLogErrorsMaxLength = default(string), string masterLogErrorsMaxLength = default(string)) - : base(id, name, kind, type) - { - LocalLogErrors = localLogErrors; - MasterLogErrors = masterLogErrors; - LocalLogErrorsMaxLength = localLogErrorsMaxLength; - MasterLogErrorsMaxLength = masterLogErrorsMaxLength; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets local log_errors setting. - /// - [JsonProperty(PropertyName = "properties.localLogErrors")] - public string LocalLogErrors { get; set; } - - /// - /// Gets or sets master log_errors setting. - /// - [JsonProperty(PropertyName = "properties.masterLogErrors")] - public string MasterLogErrors { get; set; } - - /// - /// Gets or sets local log_errors_max_len setting. - /// - [JsonProperty(PropertyName = "properties.localLogErrorsMaxLength")] - public string LocalLogErrorsMaxLength { get; set; } - - /// - /// Gets or sets master log_errors_max_len setting. - /// - [JsonProperty(PropertyName = "properties.masterLogErrorsMaxLength")] - public string MasterLogErrorsMaxLength { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteRuntimeState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteRuntimeState.cs deleted file mode 100644 index 06ddc43c58fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteRuntimeState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SiteRuntimeState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SiteRuntimeState - { - [EnumMember(Value = "READY")] - READY, - [EnumMember(Value = "STOPPED")] - STOPPED, - [EnumMember(Value = "UNKNOWN")] - UNKNOWN - } - internal static class SiteRuntimeStateEnumExtension - { - internal static string ToSerializedValue(this SiteRuntimeState? value) - { - return value == null ? null : ((SiteRuntimeState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SiteRuntimeState value) - { - switch( value ) - { - case SiteRuntimeState.READY: - return "READY"; - case SiteRuntimeState.STOPPED: - return "STOPPED"; - case SiteRuntimeState.UNKNOWN: - return "UNKNOWN"; - } - return null; - } - - internal static SiteRuntimeState? ParseSiteRuntimeState(this string value) - { - switch( value ) - { - case "READY": - return SiteRuntimeState.READY; - case "STOPPED": - return SiteRuntimeState.STOPPED; - case "UNKNOWN": - return SiteRuntimeState.UNKNOWN; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSeal.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSeal.cs deleted file mode 100644 index 01aa7283ffa6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSeal.cs +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Site seal - /// - public partial class SiteSeal - { - /// - /// Initializes a new instance of the SiteSeal class. - /// - public SiteSeal() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteSeal class. - /// - /// HTML snippet - public SiteSeal(string html) - { - Html = html; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets HTML snippet - /// - [JsonProperty(PropertyName = "html")] - public string Html { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Html == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Html"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSealRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSealRequest.cs deleted file mode 100644 index e21b9e048ed2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSealRequest.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Site seal request. - /// - public partial class SiteSealRequest - { - /// - /// Initializes a new instance of the SiteSealRequest class. - /// - public SiteSealRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteSealRequest class. - /// - /// If <code>true</code> use the - /// light color theme for site seal; otherwise, use the default color - /// theme. - /// Locale of site seal. - public SiteSealRequest(bool? lightTheme = default(bool?), string locale = default(string)) - { - LightTheme = lightTheme; - Locale = locale; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt; use - /// the light color theme for site seal; otherwise, use the default - /// color theme. - /// - [JsonProperty(PropertyName = "lightTheme")] - public bool? LightTheme { get; set; } - - /// - /// Gets or sets locale of site seal. - /// - [JsonProperty(PropertyName = "locale")] - public string Locale { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs deleted file mode 100644 index 5cd75347d76b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SiteSourceControl.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Source control configuration for an app. - /// - [Rest.Serialization.JsonTransformation] - public partial class SiteSourceControl : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SiteSourceControl class. - /// - public SiteSourceControl() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SiteSourceControl class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Repository or source control URL. - /// Name of branch to use for deployment. - /// <code>true</code> to - /// limit to manual integration; <code>false</code> to - /// enable continuous integration (which configures webhooks into - /// online repos like GitHub). - /// <code>true</code> if this - /// is deployed via GitHub action. - /// <code>true</code> to - /// enable deployment rollback; otherwise, - /// <code>false</code>. - /// <code>true</code> for a - /// Mercurial repository; <code>false</code> for a Git - /// repository. - /// If GitHub Action is - /// selected, than the associated configuration. - public SiteSourceControl(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repoUrl = default(string), string branch = default(string), bool? isManualIntegration = default(bool?), bool? isGitHubAction = default(bool?), bool? deploymentRollbackEnabled = default(bool?), bool? isMercurial = default(bool?), GitHubActionConfiguration gitHubActionConfiguration = default(GitHubActionConfiguration)) - : base(id, name, kind, type) - { - RepoUrl = repoUrl; - Branch = branch; - IsManualIntegration = isManualIntegration; - IsGitHubAction = isGitHubAction; - DeploymentRollbackEnabled = deploymentRollbackEnabled; - IsMercurial = isMercurial; - GitHubActionConfiguration = gitHubActionConfiguration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets repository or source control URL. - /// - [JsonProperty(PropertyName = "properties.repoUrl")] - public string RepoUrl { get; set; } - - /// - /// Gets or sets name of branch to use for deployment. - /// - [JsonProperty(PropertyName = "properties.branch")] - public string Branch { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to limit - /// to manual integration; - /// &lt;code&gt;false&lt;/code&gt; to enable continuous - /// integration (which configures webhooks into online repos like - /// GitHub). - /// - [JsonProperty(PropertyName = "properties.isManualIntegration")] - public bool? IsManualIntegration { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// is deployed via GitHub action. - /// - [JsonProperty(PropertyName = "properties.isGitHubAction")] - public bool? IsGitHubAction { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// enable deployment rollback; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.deploymentRollbackEnabled")] - public bool? DeploymentRollbackEnabled { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; for a - /// Mercurial repository; - /// &lt;code&gt;false&lt;/code&gt; for a Git - /// repository. - /// - [JsonProperty(PropertyName = "properties.isMercurial")] - public bool? IsMercurial { get; set; } - - /// - /// Gets or sets if GitHub Action is selected, than the associated - /// configuration. - /// - [JsonProperty(PropertyName = "properties.gitHubActionConfiguration")] - public GitHubActionConfiguration GitHubActionConfiguration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs deleted file mode 100644 index dfa25b2e6273..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuCapacity.cs +++ /dev/null @@ -1,93 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Description of the App Service plan scale options. - /// - public partial class SkuCapacity - { - /// - /// Initializes a new instance of the SkuCapacity class. - /// - public SkuCapacity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SkuCapacity class. - /// - /// Minimum number of workers for this App - /// Service plan SKU. - /// Maximum number of workers for this App - /// Service plan SKU. - /// Maximum number of Elastic workers for - /// this App Service plan SKU. - /// Default number of workers for this - /// App Service plan SKU. - /// Available scale configurations for an App - /// Service plan. - public SkuCapacity(int? minimum = default(int?), int? maximum = default(int?), int? elasticMaximum = default(int?), int? defaultProperty = default(int?), string scaleType = default(string)) - { - Minimum = minimum; - Maximum = maximum; - ElasticMaximum = elasticMaximum; - DefaultProperty = defaultProperty; - ScaleType = scaleType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets minimum number of workers for this App Service plan - /// SKU. - /// - [JsonProperty(PropertyName = "minimum")] - public int? Minimum { get; set; } - - /// - /// Gets or sets maximum number of workers for this App Service plan - /// SKU. - /// - [JsonProperty(PropertyName = "maximum")] - public int? Maximum { get; set; } - - /// - /// Gets or sets maximum number of Elastic workers for this App Service - /// plan SKU. - /// - [JsonProperty(PropertyName = "elasticMaximum")] - public int? ElasticMaximum { get; set; } - - /// - /// Gets or sets default number of workers for this App Service plan - /// SKU. - /// - [JsonProperty(PropertyName = "default")] - public int? DefaultProperty { get; set; } - - /// - /// Gets or sets available scale configurations for an App Service - /// plan. - /// - [JsonProperty(PropertyName = "scaleType")] - public string ScaleType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuDescription.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuDescription.cs deleted file mode 100644 index 9fc08123d409..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuDescription.cs +++ /dev/null @@ -1,113 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Description of a SKU for a scalable resource. - /// - public partial class SkuDescription - { - /// - /// Initializes a new instance of the SkuDescription class. - /// - public SkuDescription() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SkuDescription class. - /// - /// Name of the resource SKU. - /// Service tier of the resource SKU. - /// Size specifier of the resource SKU. - /// Family code of the resource SKU. - /// Current number of instances assigned to the - /// resource. - /// Min, max, and default scale values of the - /// SKU. - /// Locations of the SKU. - /// Capabilities of the SKU, e.g., is - /// traffic manager enabled? - public SkuDescription(string name = default(string), string tier = default(string), string size = default(string), string family = default(string), int? capacity = default(int?), SkuCapacity skuCapacity = default(SkuCapacity), IList locations = default(IList), IList capabilities = default(IList)) - { - Name = name; - Tier = tier; - Size = size; - Family = family; - Capacity = capacity; - SkuCapacity = skuCapacity; - Locations = locations; - Capabilities = capabilities; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the resource SKU. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets service tier of the resource SKU. - /// - [JsonProperty(PropertyName = "tier")] - public string Tier { get; set; } - - /// - /// Gets or sets size specifier of the resource SKU. - /// - [JsonProperty(PropertyName = "size")] - public string Size { get; set; } - - /// - /// Gets or sets family code of the resource SKU. - /// - [JsonProperty(PropertyName = "family")] - public string Family { get; set; } - - /// - /// Gets or sets current number of instances assigned to the resource. - /// - [JsonProperty(PropertyName = "capacity")] - public int? Capacity { get; set; } - - /// - /// Gets or sets min, max, and default scale values of the SKU. - /// - [JsonProperty(PropertyName = "skuCapacity")] - public SkuCapacity SkuCapacity { get; set; } - - /// - /// Gets or sets locations of the SKU. - /// - [JsonProperty(PropertyName = "locations")] - public IList Locations { get; set; } - - /// - /// Gets or sets capabilities of the SKU, e.g., is traffic manager - /// enabled? - /// - [JsonProperty(PropertyName = "capabilities")] - public IList Capabilities { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfo.cs deleted file mode 100644 index 1b9dd76cabad..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfo.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// SKU discovery information. - /// - public partial class SkuInfo - { - /// - /// Initializes a new instance of the SkuInfo class. - /// - public SkuInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SkuInfo class. - /// - /// Resource type that this SKU applies - /// to. - /// Name and tier of the SKU. - /// Min, max, and default scale values of the - /// SKU. - public SkuInfo(string resourceType = default(string), SkuDescription sku = default(SkuDescription), SkuCapacity capacity = default(SkuCapacity)) - { - ResourceType = resourceType; - Sku = sku; - Capacity = capacity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource type that this SKU applies to. - /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } - - /// - /// Gets or sets name and tier of the SKU. - /// - [JsonProperty(PropertyName = "sku")] - public SkuDescription Sku { get; set; } - - /// - /// Gets or sets min, max, and default scale values of the SKU. - /// - [JsonProperty(PropertyName = "capacity")] - public SkuCapacity Capacity { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfos.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfos.cs deleted file mode 100644 index 43c105bcf20b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuInfos.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Collection of SKU information. - /// - public partial class SkuInfos - { - /// - /// Initializes a new instance of the SkuInfos class. - /// - public SkuInfos() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SkuInfos class. - /// - /// Resource type that this SKU applies - /// to. - /// List of SKUs the subscription is able to - /// use. - public SkuInfos(string resourceType = default(string), IList skus = default(IList)) - { - ResourceType = resourceType; - Skus = skus; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource type that this SKU applies to. - /// - [JsonProperty(PropertyName = "resourceType")] - public string ResourceType { get; set; } - - /// - /// Gets or sets list of SKUs the subscription is able to use. - /// - [JsonProperty(PropertyName = "skus")] - public IList Skus { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs deleted file mode 100644 index a3a68be1409f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SkuName.cs +++ /dev/null @@ -1,33 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for SkuName. - /// - public static class SkuName - { - public const string Free = "Free"; - public const string Shared = "Shared"; - public const string Basic = "Basic"; - public const string Standard = "Standard"; - public const string Premium = "Premium"; - public const string Dynamic = "Dynamic"; - public const string Isolated = "Isolated"; - public const string IsolatedV2 = "IsolatedV2"; - public const string PremiumV2 = "PremiumV2"; - public const string PremiumV3 = "PremiumV3"; - public const string PremiumContainer = "PremiumContainer"; - public const string ElasticPremium = "ElasticPremium"; - public const string ElasticIsolated = "ElasticIsolated"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotConfigNamesResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotConfigNamesResource.cs deleted file mode 100644 index a994ab81d947..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotConfigNamesResource.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Slot Config names azure resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class SlotConfigNamesResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SlotConfigNamesResource class. - /// - public SlotConfigNamesResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SlotConfigNamesResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// List of connection string - /// names. - /// List of application settings - /// names. - /// List of external Azure - /// storage account identifiers. - public SlotConfigNamesResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList connectionStringNames = default(IList), IList appSettingNames = default(IList), IList azureStorageConfigNames = default(IList)) - : base(id, name, kind, type) - { - ConnectionStringNames = connectionStringNames; - AppSettingNames = appSettingNames; - AzureStorageConfigNames = azureStorageConfigNames; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of connection string names. - /// - [JsonProperty(PropertyName = "properties.connectionStringNames")] - public IList ConnectionStringNames { get; set; } - - /// - /// Gets or sets list of application settings names. - /// - [JsonProperty(PropertyName = "properties.appSettingNames")] - public IList AppSettingNames { get; set; } - - /// - /// Gets or sets list of external Azure storage account identifiers. - /// - [JsonProperty(PropertyName = "properties.azureStorageConfigNames")] - public IList AzureStorageConfigNames { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotDifference.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotDifference.cs deleted file mode 100644 index 247330959681..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotDifference.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A setting difference between two deployment slots of an app. - /// - [Rest.Serialization.JsonTransformation] - public partial class SlotDifference : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SlotDifference class. - /// - public SlotDifference() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SlotDifference class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Level of the difference: Information, Warning - /// or Error. - /// The type of the setting: General, - /// AppSetting or ConnectionString. - /// Rule that describes how to process the - /// setting difference during a slot swap. - /// Name of the setting. - /// Value of the setting in the - /// current slot. - /// Value of the setting in the target - /// slot. - /// Description of the setting - /// difference. - public SlotDifference(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string level = default(string), string settingType = default(string), string diffRule = default(string), string settingName = default(string), string valueInCurrentSlot = default(string), string valueInTargetSlot = default(string), string description = default(string)) - : base(id, name, kind, type) - { - Level = level; - SettingType = settingType; - DiffRule = diffRule; - SettingName = settingName; - ValueInCurrentSlot = valueInCurrentSlot; - ValueInTargetSlot = valueInTargetSlot; - Description = description; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets level of the difference: Information, Warning or Error. - /// - [JsonProperty(PropertyName = "properties.level")] - public string Level { get; private set; } - - /// - /// Gets the type of the setting: General, AppSetting or - /// ConnectionString. - /// - [JsonProperty(PropertyName = "properties.settingType")] - public string SettingType { get; private set; } - - /// - /// Gets rule that describes how to process the setting difference - /// during a slot swap. - /// - [JsonProperty(PropertyName = "properties.diffRule")] - public string DiffRule { get; private set; } - - /// - /// Gets name of the setting. - /// - [JsonProperty(PropertyName = "properties.settingName")] - public string SettingName { get; private set; } - - /// - /// Gets value of the setting in the current slot. - /// - [JsonProperty(PropertyName = "properties.valueInCurrentSlot")] - public string ValueInCurrentSlot { get; private set; } - - /// - /// Gets value of the setting in the target slot. - /// - [JsonProperty(PropertyName = "properties.valueInTargetSlot")] - public string ValueInTargetSlot { get; private set; } - - /// - /// Gets description of the setting difference. - /// - [JsonProperty(PropertyName = "properties.description")] - public string Description { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotSwapStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotSwapStatus.cs deleted file mode 100644 index 10b3546ea071..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlotSwapStatus.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The status of the last successful slot swap operation. - /// - public partial class SlotSwapStatus - { - /// - /// Initializes a new instance of the SlotSwapStatus class. - /// - public SlotSwapStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SlotSwapStatus class. - /// - /// The time the last successful slot swap - /// completed. - /// The source slot of the last swap - /// operation. - /// The destination slot of the last - /// swap operation. - public SlotSwapStatus(System.DateTime? timestampUtc = default(System.DateTime?), string sourceSlotName = default(string), string destinationSlotName = default(string)) - { - TimestampUtc = timestampUtc; - SourceSlotName = sourceSlotName; - DestinationSlotName = destinationSlotName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the time the last successful slot swap completed. - /// - [JsonProperty(PropertyName = "timestampUtc")] - public System.DateTime? TimestampUtc { get; private set; } - - /// - /// Gets the source slot of the last swap operation. - /// - [JsonProperty(PropertyName = "sourceSlotName")] - public string SourceSlotName { get; private set; } - - /// - /// Gets the destination slot of the last swap operation. - /// - [JsonProperty(PropertyName = "destinationSlotName")] - public string DestinationSlotName { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs deleted file mode 100644 index 8eb176a65999..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SlowRequestsBasedTrigger.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Trigger based on request execution time. - /// - public partial class SlowRequestsBasedTrigger - { - /// - /// Initializes a new instance of the SlowRequestsBasedTrigger class. - /// - public SlowRequestsBasedTrigger() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SlowRequestsBasedTrigger class. - /// - /// Time taken. - /// Request Path. - /// Request Count. - /// Time interval. - public SlowRequestsBasedTrigger(string timeTaken = default(string), string path = default(string), int? count = default(int?), string timeInterval = default(string)) - { - TimeTaken = timeTaken; - Path = path; - Count = count; - TimeInterval = timeInterval; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets time taken. - /// - [JsonProperty(PropertyName = "timeTaken")] - public string TimeTaken { get; set; } - - /// - /// Gets or sets request Path. - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - /// - /// Gets or sets request Count. - /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - - /// - /// Gets or sets time interval. - /// - [JsonProperty(PropertyName = "timeInterval")] - public string TimeInterval { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Snapshot.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Snapshot.cs deleted file mode 100644 index c0bb80c070d2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Snapshot.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A snapshot of an app. - /// - [Rest.Serialization.JsonTransformation] - public partial class Snapshot : ProxyOnlyResource - { - /// - /// Initializes a new instance of the Snapshot class. - /// - public Snapshot() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Snapshot class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The time the snapshot was taken. - public Snapshot(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string time = default(string)) - : base(id, name, kind, type) - { - Time = time; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the time the snapshot was taken. - /// - [JsonProperty(PropertyName = "properties.time")] - public string Time { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRecoverySource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRecoverySource.cs deleted file mode 100644 index 4353300da633..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRecoverySource.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specifies the web app that snapshot contents will be retrieved from. - /// - public partial class SnapshotRecoverySource - { - /// - /// Initializes a new instance of the SnapshotRecoverySource class. - /// - public SnapshotRecoverySource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SnapshotRecoverySource class. - /// - /// Geographical location of the source web app, - /// e.g. SouthEastAsia, SouthCentralUS - /// ARM resource ID of the source app. - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} - /// for production slots and - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} - /// for other slots. - public SnapshotRecoverySource(string location = default(string), string id = default(string)) - { - Location = location; - Id = id; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets geographical location of the source web app, e.g. - /// SouthEastAsia, SouthCentralUS - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets ARM resource ID of the source app. - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} - /// for production slots and - /// /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} - /// for other slots. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRestoreRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRestoreRequest.cs deleted file mode 100644 index 2b4e6097d617..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SnapshotRestoreRequest.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Details about app recovery operation. - /// - [Rest.Serialization.JsonTransformation] - public partial class SnapshotRestoreRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SnapshotRestoreRequest class. - /// - public SnapshotRestoreRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SnapshotRestoreRequest class. - /// - /// If <code>true</code> the - /// restore operation can overwrite source app; otherwise, - /// <code>false</code>. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Point in time in which the app restore - /// should be done, formatted as a DateTime string. - /// Optional. Specifies the web app that - /// snapshot contents will be retrieved from. - /// If empty, the targeted web app will be used as the source. - /// If true, site configuration, in - /// addition to content, will be reverted. - /// If true, custom hostname - /// conflicts will be ignored when recovering to a target web app. - /// This setting is only necessary when RecoverConfiguration is - /// enabled. - /// If true, the snapshot is retrieved - /// from DRSecondary endpoint. - public SnapshotRestoreRequest(bool overwrite, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string snapshotTime = default(string), SnapshotRecoverySource recoverySource = default(SnapshotRecoverySource), bool? recoverConfiguration = default(bool?), bool? ignoreConflictingHostNames = default(bool?), bool? useDRSecondary = default(bool?)) - : base(id, name, kind, type) - { - SnapshotTime = snapshotTime; - RecoverySource = recoverySource; - Overwrite = overwrite; - RecoverConfiguration = recoverConfiguration; - IgnoreConflictingHostNames = ignoreConflictingHostNames; - UseDRSecondary = useDRSecondary; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets point in time in which the app restore should be done, - /// formatted as a DateTime string. - /// - [JsonProperty(PropertyName = "properties.snapshotTime")] - public string SnapshotTime { get; set; } - - /// - /// Gets or sets optional. Specifies the web app that snapshot contents - /// will be retrieved from. - /// If empty, the targeted web app will be used as the source. - /// - [JsonProperty(PropertyName = "properties.recoverySource")] - public SnapshotRecoverySource RecoverySource { get; set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt; the - /// restore operation can overwrite source app; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.overwrite")] - public bool Overwrite { get; set; } - - /// - /// Gets or sets if true, site configuration, in addition to content, - /// will be reverted. - /// - [JsonProperty(PropertyName = "properties.recoverConfiguration")] - public bool? RecoverConfiguration { get; set; } - - /// - /// Gets or sets if true, custom hostname conflicts will be ignored - /// when recovering to a target web app. - /// This setting is only necessary when RecoverConfiguration is - /// enabled. - /// - [JsonProperty(PropertyName = "properties.ignoreConflictingHostNames")] - public bool? IgnoreConflictingHostNames { get; set; } - - /// - /// Gets or sets if true, the snapshot is retrieved from DRSecondary - /// endpoint. - /// - [JsonProperty(PropertyName = "properties.useDRSecondary")] - public bool? UseDRSecondary { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Solution.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Solution.cs deleted file mode 100644 index 99a1b4a7070c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Solution.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Class Representing Solution for problems detected. - /// - public partial class Solution - { - /// - /// Initializes a new instance of the Solution class. - /// - public Solution() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Solution class. - /// - /// Solution Id. - /// Display Name of the solution - /// Order of the solution. - /// Description of the solution - /// Type of Solution. Possible values include: - /// 'QuickSolution', 'DeepInvestigation', 'BestPractices' - /// Solution Data. - /// Solution Metadata. - public Solution(double? id = default(double?), string displayName = default(string), double? order = default(double?), string description = default(string), SolutionType? type = default(SolutionType?), IList> data = default(IList>), IList> metadata = default(IList>)) - { - Id = id; - DisplayName = displayName; - Order = order; - Description = description; - Type = type; - Data = data; - Metadata = metadata; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets solution Id. - /// - [JsonProperty(PropertyName = "id")] - public double? Id { get; set; } - - /// - /// Gets or sets display Name of the solution - /// - [JsonProperty(PropertyName = "displayName")] - public string DisplayName { get; set; } - - /// - /// Gets or sets order of the solution. - /// - [JsonProperty(PropertyName = "order")] - public double? Order { get; set; } - - /// - /// Gets or sets description of the solution - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets type of Solution. Possible values include: - /// 'QuickSolution', 'DeepInvestigation', 'BestPractices' - /// - [JsonProperty(PropertyName = "type")] - public SolutionType? Type { get; set; } - - /// - /// Gets or sets solution Data. - /// - [JsonProperty(PropertyName = "data")] - public IList> Data { get; set; } - - /// - /// Gets or sets solution Metadata. - /// - [JsonProperty(PropertyName = "metadata")] - public IList> Metadata { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SolutionType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SolutionType.cs deleted file mode 100644 index 9ea01159dd10..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SolutionType.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SolutionType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SolutionType - { - [EnumMember(Value = "QuickSolution")] - QuickSolution, - [EnumMember(Value = "DeepInvestigation")] - DeepInvestigation, - [EnumMember(Value = "BestPractices")] - BestPractices - } - internal static class SolutionTypeEnumExtension - { - internal static string ToSerializedValue(this SolutionType? value) - { - return value == null ? null : ((SolutionType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SolutionType value) - { - switch( value ) - { - case SolutionType.QuickSolution: - return "QuickSolution"; - case SolutionType.DeepInvestigation: - return "DeepInvestigation"; - case SolutionType.BestPractices: - return "BestPractices"; - } - return null; - } - - internal static SolutionType? ParseSolutionType(this string value) - { - switch( value ) - { - case "QuickSolution": - return SolutionType.QuickSolution; - case "DeepInvestigation": - return SolutionType.DeepInvestigation; - case "BestPractices": - return SolutionType.BestPractices; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SourceControl.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SourceControl.cs deleted file mode 100644 index 6aed94a10774..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SourceControl.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The source control OAuth token. - /// - [Rest.Serialization.JsonTransformation] - public partial class SourceControl : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SourceControl class. - /// - public SourceControl() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SourceControl class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// OAuth access token. - /// OAuth access token secret. - /// OAuth refresh token. - /// OAuth token expiration. - public SourceControl(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string token = default(string), string tokenSecret = default(string), string refreshToken = default(string), System.DateTime? expirationTime = default(System.DateTime?)) - : base(id, name, kind, type) - { - Token = token; - TokenSecret = tokenSecret; - RefreshToken = refreshToken; - ExpirationTime = expirationTime; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets oAuth access token. - /// - [JsonProperty(PropertyName = "properties.token")] - public string Token { get; set; } - - /// - /// Gets or sets oAuth access token secret. - /// - [JsonProperty(PropertyName = "properties.tokenSecret")] - public string TokenSecret { get; set; } - - /// - /// Gets or sets oAuth refresh token. - /// - [JsonProperty(PropertyName = "properties.refreshToken")] - public string RefreshToken { get; set; } - - /// - /// Gets or sets oAuth token expiration. - /// - [JsonProperty(PropertyName = "properties.expirationTime")] - public System.DateTime? ExpirationTime { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SslState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SslState.cs deleted file mode 100644 index 70fae077e8e2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SslState.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for SslState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SslState - { - [EnumMember(Value = "Disabled")] - Disabled, - [EnumMember(Value = "SniEnabled")] - SniEnabled, - [EnumMember(Value = "IpBasedEnabled")] - IpBasedEnabled - } - internal static class SslStateEnumExtension - { - internal static string ToSerializedValue(this SslState? value) - { - return value == null ? null : ((SslState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this SslState value) - { - switch( value ) - { - case SslState.Disabled: - return "Disabled"; - case SslState.SniEnabled: - return "SniEnabled"; - case SslState.IpBasedEnabled: - return "IpBasedEnabled"; - } - return null; - } - - internal static SslState? ParseSslState(this string value) - { - switch( value ) - { - case "Disabled": - return SslState.Disabled; - case "SniEnabled": - return SslState.SniEnabled; - case "IpBasedEnabled": - return SslState.IpBasedEnabled; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs deleted file mode 100644 index cb090801ecf0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMajorVersion.cs +++ /dev/null @@ -1,167 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Application stack major version. - /// - public partial class StackMajorVersion - { - /// - /// Initializes a new instance of the StackMajorVersion class. - /// - public StackMajorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StackMajorVersion class. - /// - /// Application stack major version - /// (display only). - /// Application stack major version - /// (runtime only). - /// <code>true</code> if this is - /// the default major version; otherwise, - /// <code>false</code>. - /// Minor versions associated with the - /// major version. - /// <code>true</code> if - /// this supports Application Insights; otherwise, - /// <code>false</code>. - /// <code>true</code> if this stack - /// is in Preview, otherwise <code>false</code>. - /// <code>true</code> if this - /// stack has been deprecated, otherwise - /// <code>false</code>. - /// <code>true</code> if this stack - /// should be hidden for new customers on portal, otherwise - /// <code>false</code>. - /// <appSettings> - /// <appSetting name="FUNCTIONS_WORKER_RUNTIME" value="dotnet" /> - /// </appSettings> - /// Example: All the function apps need AppSetting: - /// "FUNCTIONS_WORKER_RUNTIME" to be set stack name - /// <siteConfigProperties> - /// <siteConfigProperty name="Use32BitWorkerProcess" value="false" - /// /> - /// </siteConfigProperties> - /// Example: All Linux Function Apps, need Use32BitWorkerProcess to be - /// set to 0 - public StackMajorVersion(string displayVersion = default(string), string runtimeVersion = default(string), bool? isDefault = default(bool?), IList minorVersions = default(IList), bool? applicationInsights = default(bool?), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), IDictionary appSettingsDictionary = default(IDictionary), IDictionary siteConfigPropertiesDictionary = default(IDictionary)) - { - DisplayVersion = displayVersion; - RuntimeVersion = runtimeVersion; - IsDefault = isDefault; - MinorVersions = minorVersions; - ApplicationInsights = applicationInsights; - IsPreview = isPreview; - IsDeprecated = isDeprecated; - IsHidden = isHidden; - AppSettingsDictionary = appSettingsDictionary; - SiteConfigPropertiesDictionary = siteConfigPropertiesDictionary; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application stack major version (display only). - /// - [JsonProperty(PropertyName = "displayVersion")] - public string DisplayVersion { get; set; } - - /// - /// Gets or sets application stack major version (runtime only). - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// is the default major version; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDefault")] - public bool? IsDefault { get; set; } - - /// - /// Gets or sets minor versions associated with the major version. - /// - [JsonProperty(PropertyName = "minorVersions")] - public IList MinorVersions { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// supports Application Insights; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "applicationInsights")] - public bool? ApplicationInsights { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// stack is in Preview, otherwise - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// stack has been deprecated, otherwise - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public bool? IsDeprecated { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// stack should be hidden for new customers on portal, otherwise - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isHidden")] - public bool? IsHidden { get; set; } - - /// - /// Gets or sets &lt;appSettings&gt; - /// &lt;appSetting name="FUNCTIONS_WORKER_RUNTIME" value="dotnet" - /// /&gt; - /// &lt;/appSettings&gt; - /// Example: All the function apps need AppSetting: - /// "FUNCTIONS_WORKER_RUNTIME" to be set stack name - /// - [JsonProperty(PropertyName = "appSettingsDictionary")] - public IDictionary AppSettingsDictionary { get; set; } - - /// - /// Gets or sets &lt;siteConfigProperties&gt; - /// &lt;siteConfigProperty name="Use32BitWorkerProcess" - /// value="false" /&gt; - /// &lt;/siteConfigProperties&gt; - /// Example: All Linux Function Apps, need Use32BitWorkerProcess to be - /// set to 0 - /// - [JsonProperty(PropertyName = "siteConfigPropertiesDictionary")] - public IDictionary SiteConfigPropertiesDictionary { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMinorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMinorVersion.cs deleted file mode 100644 index a4671b857f50..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackMinorVersion.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Application stack minor version. - /// - public partial class StackMinorVersion - { - /// - /// Initializes a new instance of the StackMinorVersion class. - /// - public StackMinorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StackMinorVersion class. - /// - /// Application stack minor version - /// (display only). - /// Application stack minor version - /// (runtime only). - /// <code>true</code> if this is - /// the default minor version; otherwise, - /// <code>false</code>. - /// <code>true</code> if - /// this supports Remote Debugging, otherwise - /// <code>false</code>. - public StackMinorVersion(string displayVersion = default(string), string runtimeVersion = default(string), bool? isDefault = default(bool?), bool? isRemoteDebuggingEnabled = default(bool?)) - { - DisplayVersion = displayVersion; - RuntimeVersion = runtimeVersion; - IsDefault = isDefault; - IsRemoteDebuggingEnabled = isRemoteDebuggingEnabled; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets application stack minor version (display only). - /// - [JsonProperty(PropertyName = "displayVersion")] - public string DisplayVersion { get; set; } - - /// - /// Gets or sets application stack minor version (runtime only). - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// is the default minor version; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDefault")] - public bool? IsDefault { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if this - /// supports Remote Debugging, otherwise - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isRemoteDebuggingEnabled")] - public bool? IsRemoteDebuggingEnabled { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs deleted file mode 100644 index d12283ab5958..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StackPreferredOs.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for StackPreferredOs. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StackPreferredOs - { - [EnumMember(Value = "Windows")] - Windows, - [EnumMember(Value = "Linux")] - Linux - } - internal static class StackPreferredOsEnumExtension - { - internal static string ToSerializedValue(this StackPreferredOs? value) - { - return value == null ? null : ((StackPreferredOs)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this StackPreferredOs value) - { - switch( value ) - { - case StackPreferredOs.Windows: - return "Windows"; - case StackPreferredOs.Linux: - return "Linux"; - } - return null; - } - - internal static StackPreferredOs? ParseStackPreferredOs(this string value) - { - switch( value ) - { - case "Windows": - return StackPreferredOs.Windows; - case "Linux": - return StackPreferredOs.Linux; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs deleted file mode 100644 index ecc4ba1af774..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StagingEnvironmentPolicy.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for StagingEnvironmentPolicy. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StagingEnvironmentPolicy - { - [EnumMember(Value = "Enabled")] - Enabled, - [EnumMember(Value = "Disabled")] - Disabled - } - internal static class StagingEnvironmentPolicyEnumExtension - { - internal static string ToSerializedValue(this StagingEnvironmentPolicy? value) - { - return value == null ? null : ((StagingEnvironmentPolicy)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this StagingEnvironmentPolicy value) - { - switch( value ) - { - case StagingEnvironmentPolicy.Enabled: - return "Enabled"; - case StagingEnvironmentPolicy.Disabled: - return "Disabled"; - } - return null; - } - - internal static StagingEnvironmentPolicy? ParseStagingEnvironmentPolicy(this string value) - { - switch( value ) - { - case "Enabled": - return StagingEnvironmentPolicy.Enabled; - case "Disabled": - return StagingEnvironmentPolicy.Disabled; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs deleted file mode 100644 index 05fb910f6b8d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StampCapacity.cs +++ /dev/null @@ -1,157 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Stamp capacity information. - /// - public partial class StampCapacity - { - /// - /// Initializes a new instance of the StampCapacity class. - /// - public StampCapacity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StampCapacity class. - /// - /// Name of the stamp. - /// Available capacity (# of machines, - /// bytes of storage etc...). - /// Total capacity (# of machines, bytes of - /// storage etc...). - /// Name of the unit. - /// Shared/dedicated workers. Possible values - /// include: 'Shared', 'Dedicated', 'Dynamic' - /// Size of the machines. Possible values - /// include: 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'SmallV3', - /// 'MediumV3', 'LargeV3', 'NestedSmall', 'NestedSmallLinux', - /// 'Default' - /// Size ID of machines: - /// 0 - Small - /// 1 - Medium - /// 2 - Large - /// If - /// <code>true</code>, it includes basic apps. - /// Basic apps are not used for capacity allocation. - /// <code>true</code> - /// if capacity is applicable for all apps; otherwise, - /// <code>false</code>. - /// Shared or Dedicated. - /// Is this a linux stamp capacity - public StampCapacity(string name = default(string), long? availableCapacity = default(long?), long? totalCapacity = default(long?), string unit = default(string), ComputeModeOptions? computeMode = default(ComputeModeOptions?), WorkerSizeOptions? workerSize = default(WorkerSizeOptions?), int? workerSizeId = default(int?), bool? excludeFromCapacityAllocation = default(bool?), bool? isApplicableForAllComputeModes = default(bool?), string siteMode = default(string), bool? isLinux = default(bool?)) - { - Name = name; - AvailableCapacity = availableCapacity; - TotalCapacity = totalCapacity; - Unit = unit; - ComputeMode = computeMode; - WorkerSize = workerSize; - WorkerSizeId = workerSizeId; - ExcludeFromCapacityAllocation = excludeFromCapacityAllocation; - IsApplicableForAllComputeModes = isApplicableForAllComputeModes; - SiteMode = siteMode; - IsLinux = isLinux; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of the stamp. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets available capacity (# of machines, bytes of storage - /// etc...). - /// - [JsonProperty(PropertyName = "availableCapacity")] - public long? AvailableCapacity { get; set; } - - /// - /// Gets or sets total capacity (# of machines, bytes of storage - /// etc...). - /// - [JsonProperty(PropertyName = "totalCapacity")] - public long? TotalCapacity { get; set; } - - /// - /// Gets or sets name of the unit. - /// - [JsonProperty(PropertyName = "unit")] - public string Unit { get; set; } - - /// - /// Gets or sets shared/dedicated workers. Possible values include: - /// 'Shared', 'Dedicated', 'Dynamic' - /// - [JsonProperty(PropertyName = "computeMode")] - public ComputeModeOptions? ComputeMode { get; set; } - - /// - /// Gets or sets size of the machines. Possible values include: - /// 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'SmallV3', - /// 'MediumV3', 'LargeV3', 'NestedSmall', 'NestedSmallLinux', 'Default' - /// - [JsonProperty(PropertyName = "workerSize")] - public WorkerSizeOptions? WorkerSize { get; set; } - - /// - /// Gets or sets size ID of machines: - /// 0 - Small - /// 1 - Medium - /// 2 - Large - /// - [JsonProperty(PropertyName = "workerSizeId")] - public int? WorkerSizeId { get; set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, it - /// includes basic apps. - /// Basic apps are not used for capacity allocation. - /// - [JsonProperty(PropertyName = "excludeFromCapacityAllocation")] - public bool? ExcludeFromCapacityAllocation { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// capacity is applicable for all apps; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isApplicableForAllComputeModes")] - public bool? IsApplicableForAllComputeModes { get; set; } - - /// - /// Gets or sets shared or Dedicated. - /// - [JsonProperty(PropertyName = "siteMode")] - public string SiteMode { get; set; } - - /// - /// Gets or sets is this a linux stamp capacity - /// - [JsonProperty(PropertyName = "isLinux")] - public bool? IsLinux { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs deleted file mode 100644 index 5126311bab83..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteARMResource.cs +++ /dev/null @@ -1,224 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Static Site ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteARMResource : Resource - { - /// - /// Initializes a new instance of the StaticSiteARMResource class. - /// - public StaticSiteARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteARMResource class. - /// - /// Resource Location. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Resource tags. - /// The default autogenerated hostname - /// for the static site. - /// URL for the repository of the static - /// site. - /// The target branch in the repository. - /// The custom domains associated with this - /// static site. - /// A user's github repository token. - /// This is used to setup the Github Actions workflow file and API - /// secrets. - /// Build properties to configure on the - /// repository. - /// Private endpoint - /// connections - /// State indicating whether - /// staging environments are allowed or not allowed for a static web - /// app. Possible values include: 'Enabled', 'Disabled' - /// <code>false</code> - /// if config file is locked for this static web app; otherwise, - /// <code>true</code>. - /// Template options for generating a - /// new repository. - /// The content distribution - /// endpoint for the static site. - /// Identity to use for Key - /// Vault Reference authentication. - /// User provided function apps - /// registered with the static site - /// The provider that submitted the last - /// deployment to the primary environment of the static site. - /// State indicating the status - /// of the enterprise grade CDN serving traffic to the static web app. - /// Possible values include: 'Enabled', 'Enabling', 'Disabled', - /// 'Disabling' - public StaticSiteARMResource(string location, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary tags = default(IDictionary), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string), string enterpriseGradeCdnStatus = default(string), SkuDescription sku = default(SkuDescription), ManagedServiceIdentity identity = default(ManagedServiceIdentity)) - : base(location, id, name, kind, type, tags) - { - DefaultHostname = defaultHostname; - RepositoryUrl = repositoryUrl; - Branch = branch; - CustomDomains = customDomains; - RepositoryToken = repositoryToken; - BuildProperties = buildProperties; - PrivateEndpointConnections = privateEndpointConnections; - StagingEnvironmentPolicy = stagingEnvironmentPolicy; - AllowConfigFileUpdates = allowConfigFileUpdates; - TemplateProperties = templateProperties; - ContentDistributionEndpoint = contentDistributionEndpoint; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - UserProvidedFunctionApps = userProvidedFunctionApps; - Provider = provider; - EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; - Sku = sku; - Identity = identity; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the default autogenerated hostname for the static site. - /// - [JsonProperty(PropertyName = "properties.defaultHostname")] - public string DefaultHostname { get; private set; } - - /// - /// Gets or sets URL for the repository of the static site. - /// - [JsonProperty(PropertyName = "properties.repositoryUrl")] - public string RepositoryUrl { get; set; } - - /// - /// Gets or sets the target branch in the repository. - /// - [JsonProperty(PropertyName = "properties.branch")] - public string Branch { get; set; } - - /// - /// Gets the custom domains associated with this static site. - /// - [JsonProperty(PropertyName = "properties.customDomains")] - public IList CustomDomains { get; private set; } - - /// - /// Gets or sets a user's github repository token. This is used to - /// setup the Github Actions workflow file and API secrets. - /// - [JsonProperty(PropertyName = "properties.repositoryToken")] - public string RepositoryToken { get; set; } - - /// - /// Gets or sets build properties to configure on the repository. - /// - [JsonProperty(PropertyName = "properties.buildProperties")] - public StaticSiteBuildProperties BuildProperties { get; set; } - - /// - /// Gets private endpoint connections - /// - [JsonProperty(PropertyName = "properties.privateEndpointConnections")] - public IList PrivateEndpointConnections { get; private set; } - - /// - /// Gets or sets state indicating whether staging environments are - /// allowed or not allowed for a static web app. Possible values - /// include: 'Enabled', 'Disabled' - /// - [JsonProperty(PropertyName = "properties.stagingEnvironmentPolicy")] - public StagingEnvironmentPolicy? StagingEnvironmentPolicy { get; set; } - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if - /// config file is locked for this static web app; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.allowConfigFileUpdates")] - public bool? AllowConfigFileUpdates { get; set; } - - /// - /// Gets or sets template options for generating a new repository. - /// - [JsonProperty(PropertyName = "properties.templateProperties")] - public StaticSiteTemplateOptions TemplateProperties { get; set; } - - /// - /// Gets the content distribution endpoint for the static site. - /// - [JsonProperty(PropertyName = "properties.contentDistributionEndpoint")] - public string ContentDistributionEndpoint { get; private set; } - - /// - /// Gets identity to use for Key Vault Reference authentication. - /// - [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; private set; } - - /// - /// Gets user provided function apps registered with the static site - /// - [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] - public IList UserProvidedFunctionApps { get; private set; } - - /// - /// Gets or sets the provider that submitted the last deployment to the - /// primary environment of the static site. - /// - [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; set; } - - /// - /// Gets or sets state indicating the status of the enterprise grade - /// CDN serving traffic to the static web app. Possible values include: - /// 'Enabled', 'Enabling', 'Disabled', 'Disabling' - /// - [JsonProperty(PropertyName = "properties.enterpriseGradeCdnStatus")] - public string EnterpriseGradeCdnStatus { get; set; } - - /// - /// - [JsonProperty(PropertyName = "sku")] - public SkuDescription Sku { get; set; } - - /// - /// - [JsonProperty(PropertyName = "identity")] - public ManagedServiceIdentity Identity { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs deleted file mode 100644 index 12a4c431d1fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildARMResource.cs +++ /dev/null @@ -1,127 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Static Site Build ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteBuildARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSiteBuildARMResource class. - /// - public StaticSiteBuildARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteBuildARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// An identifier for the static site - /// build. - /// The source branch. - /// The title of a pull request that a - /// static site build is related to. - /// The hostname for a static site - /// build. - /// When this build was created. - /// When this build was updated. - /// The status of the static site build. Possible - /// values include: 'WaitingForDeployment', 'Uploading', 'Deploying', - /// 'Ready', 'Failed', 'Deleting', 'Detached' - /// User provided function apps - /// registered with the static site build - public StaticSiteBuildARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string buildId = default(string), string sourceBranch = default(string), string pullRequestTitle = default(string), string hostname = default(string), System.DateTime? createdTimeUtc = default(System.DateTime?), System.DateTime? lastUpdatedOn = default(System.DateTime?), string status = default(string), IList userProvidedFunctionApps = default(IList)) - : base(id, name, kind, type) - { - BuildId = buildId; - SourceBranch = sourceBranch; - PullRequestTitle = pullRequestTitle; - Hostname = hostname; - CreatedTimeUtc = createdTimeUtc; - LastUpdatedOn = lastUpdatedOn; - Status = status; - UserProvidedFunctionApps = userProvidedFunctionApps; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets an identifier for the static site build. - /// - [JsonProperty(PropertyName = "properties.buildId")] - public string BuildId { get; private set; } - - /// - /// Gets the source branch. - /// - [JsonProperty(PropertyName = "properties.sourceBranch")] - public string SourceBranch { get; private set; } - - /// - /// Gets the title of a pull request that a static site build is - /// related to. - /// - [JsonProperty(PropertyName = "properties.pullRequestTitle")] - public string PullRequestTitle { get; private set; } - - /// - /// Gets the hostname for a static site build. - /// - [JsonProperty(PropertyName = "properties.hostname")] - public string Hostname { get; private set; } - - /// - /// Gets when this build was created. - /// - [JsonProperty(PropertyName = "properties.createdTimeUtc")] - public System.DateTime? CreatedTimeUtc { get; private set; } - - /// - /// Gets when this build was updated. - /// - [JsonProperty(PropertyName = "properties.lastUpdatedOn")] - public System.DateTime? LastUpdatedOn { get; private set; } - - /// - /// Gets the status of the static site build. Possible values include: - /// 'WaitingForDeployment', 'Uploading', 'Deploying', 'Ready', - /// 'Failed', 'Deleting', 'Detached' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Gets user provided function apps registered with the static site - /// build - /// - [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] - public IList UserProvidedFunctionApps { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs deleted file mode 100644 index 1fb669c33640..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteBuildProperties.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Build properties for the static site. - /// - public partial class StaticSiteBuildProperties - { - /// - /// Initializes a new instance of the StaticSiteBuildProperties class. - /// - public StaticSiteBuildProperties() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteBuildProperties class. - /// - /// The path to the app code within the - /// repository. - /// The path to the api code within the - /// repository. - /// Deprecated: The path of the app - /// artifacts after building (deprecated in favor of - /// OutputLocation) - /// The output path of the app after - /// building. - /// A custom command to run during - /// deployment of the static content application. - /// A custom command to run during - /// deployment of the Azure Functions API application. - /// Skip Github Action - /// workflow generation. - /// Github Action secret - /// name override. - public StaticSiteBuildProperties(string appLocation = default(string), string apiLocation = default(string), string appArtifactLocation = default(string), string outputLocation = default(string), string appBuildCommand = default(string), string apiBuildCommand = default(string), bool? skipGithubActionWorkflowGeneration = default(bool?), string githubActionSecretNameOverride = default(string)) - { - AppLocation = appLocation; - ApiLocation = apiLocation; - AppArtifactLocation = appArtifactLocation; - OutputLocation = outputLocation; - AppBuildCommand = appBuildCommand; - ApiBuildCommand = apiBuildCommand; - SkipGithubActionWorkflowGeneration = skipGithubActionWorkflowGeneration; - GithubActionSecretNameOverride = githubActionSecretNameOverride; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the path to the app code within the repository. - /// - [JsonProperty(PropertyName = "appLocation")] - public string AppLocation { get; set; } - - /// - /// Gets or sets the path to the api code within the repository. - /// - [JsonProperty(PropertyName = "apiLocation")] - public string ApiLocation { get; set; } - - /// - /// Gets or sets deprecated: The path of the app artifacts after - /// building (deprecated in favor of OutputLocation) - /// - [JsonProperty(PropertyName = "appArtifactLocation")] - public string AppArtifactLocation { get; set; } - - /// - /// Gets or sets the output path of the app after building. - /// - [JsonProperty(PropertyName = "outputLocation")] - public string OutputLocation { get; set; } - - /// - /// Gets or sets a custom command to run during deployment of the - /// static content application. - /// - [JsonProperty(PropertyName = "appBuildCommand")] - public string AppBuildCommand { get; set; } - - /// - /// Gets or sets a custom command to run during deployment of the Azure - /// Functions API application. - /// - [JsonProperty(PropertyName = "apiBuildCommand")] - public string ApiBuildCommand { get; set; } - - /// - /// Gets or sets skip Github Action workflow generation. - /// - [JsonProperty(PropertyName = "skipGithubActionWorkflowGeneration")] - public bool? SkipGithubActionWorkflowGeneration { get; set; } - - /// - /// Gets or sets github Action secret name override. - /// - [JsonProperty(PropertyName = "githubActionSecretNameOverride")] - public string GithubActionSecretNameOverride { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs deleted file mode 100644 index 2a2403117477..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainOverviewARMResource.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site Custom Domain Overview ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteCustomDomainOverviewARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteCustomDomainOverviewARMResource class. - /// - public StaticSiteCustomDomainOverviewARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteCustomDomainOverviewARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The domain name for the static site custom - /// domain. - /// The date and time on which the custom - /// domain was created for the static site. - /// The status of the custom domain. Possible - /// values include: 'RetrievingValidationToken', 'Validating', - /// 'Adding', 'Ready', 'Failed', 'Deleting' - /// The TXT record validation - /// token - public StaticSiteCustomDomainOverviewARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string domainName = default(string), System.DateTime? createdOn = default(System.DateTime?), string status = default(string), string validationToken = default(string), string errorMessage = default(string)) - : base(id, name, kind, type) - { - DomainName = domainName; - CreatedOn = createdOn; - Status = status; - ValidationToken = validationToken; - ErrorMessage = errorMessage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the domain name for the static site custom domain. - /// - [JsonProperty(PropertyName = "properties.domainName")] - public string DomainName { get; private set; } - - /// - /// Gets the date and time on which the custom domain was created for - /// the static site. - /// - [JsonProperty(PropertyName = "properties.createdOn")] - public System.DateTime? CreatedOn { get; private set; } - - /// - /// Gets the status of the custom domain. Possible values include: - /// 'RetrievingValidationToken', 'Validating', 'Adding', 'Ready', - /// 'Failed', 'Deleting' - /// - [JsonProperty(PropertyName = "properties.status")] - public string Status { get; private set; } - - /// - /// Gets the TXT record validation token - /// - [JsonProperty(PropertyName = "properties.validationToken")] - public string ValidationToken { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "properties.errorMessage")] - public string ErrorMessage { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs deleted file mode 100644 index caee85ae6064..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteCustomDomainRequestPropertiesARMResource.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site Custom Domain Request Properties ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteCustomDomainRequestPropertiesARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteCustomDomainRequestPropertiesARMResource class. - /// - public StaticSiteCustomDomainRequestPropertiesARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteCustomDomainRequestPropertiesARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Validation method for adding a - /// custom domain - public StaticSiteCustomDomainRequestPropertiesARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string validationMethod = default(string)) - : base(id, name, kind, type) - { - ValidationMethod = validationMethod; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets validation method for adding a custom domain - /// - [JsonProperty(PropertyName = "properties.validationMethod")] - public string ValidationMethod { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteFunctionOverviewARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteFunctionOverviewARMResource.cs deleted file mode 100644 index 2e39a7c18f36..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteFunctionOverviewARMResource.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site Function Overview ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteFunctionOverviewARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteFunctionOverviewARMResource class. - /// - public StaticSiteFunctionOverviewARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteFunctionOverviewARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The name for the function - /// The trigger type of the function. - /// Possible values include: 'HttpTrigger', 'Unknown' - public StaticSiteFunctionOverviewARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionName = default(string), string triggerType = default(string)) - : base(id, name, kind, type) - { - FunctionName = functionName; - TriggerType = triggerType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the name for the function - /// - [JsonProperty(PropertyName = "properties.functionName")] - public string FunctionName { get; private set; } - - /// - /// Gets the trigger type of the function. Possible values include: - /// 'HttpTrigger', 'Unknown' - /// - [JsonProperty(PropertyName = "properties.triggerType")] - public string TriggerType { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs deleted file mode 100644 index 9daaabe8e430..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitePatchResource.cs +++ /dev/null @@ -1,200 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// ARM resource for a static site when patching - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSitePatchResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSitePatchResource class. - /// - public StaticSitePatchResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSitePatchResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The default autogenerated hostname - /// for the static site. - /// URL for the repository of the static - /// site. - /// The target branch in the repository. - /// The custom domains associated with this - /// static site. - /// A user's github repository token. - /// This is used to setup the Github Actions workflow file and API - /// secrets. - /// Build properties to configure on the - /// repository. - /// Private endpoint - /// connections - /// State indicating whether - /// staging environments are allowed or not allowed for a static web - /// app. Possible values include: 'Enabled', 'Disabled' - /// <code>false</code> - /// if config file is locked for this static web app; otherwise, - /// <code>true</code>. - /// Template options for generating a - /// new repository. - /// The content distribution - /// endpoint for the static site. - /// Identity to use for Key - /// Vault Reference authentication. - /// User provided function apps - /// registered with the static site - /// The provider that submitted the last - /// deployment to the primary environment of the static site. - /// State indicating the status - /// of the enterprise grade CDN serving traffic to the static web app. - /// Possible values include: 'Enabled', 'Enabling', 'Disabled', - /// 'Disabling' - public StaticSitePatchResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string defaultHostname = default(string), string repositoryUrl = default(string), string branch = default(string), IList customDomains = default(IList), string repositoryToken = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties), IList privateEndpointConnections = default(IList), StagingEnvironmentPolicy? stagingEnvironmentPolicy = default(StagingEnvironmentPolicy?), bool? allowConfigFileUpdates = default(bool?), StaticSiteTemplateOptions templateProperties = default(StaticSiteTemplateOptions), string contentDistributionEndpoint = default(string), string keyVaultReferenceIdentity = default(string), IList userProvidedFunctionApps = default(IList), string provider = default(string), string enterpriseGradeCdnStatus = default(string)) - : base(id, name, kind, type) - { - DefaultHostname = defaultHostname; - RepositoryUrl = repositoryUrl; - Branch = branch; - CustomDomains = customDomains; - RepositoryToken = repositoryToken; - BuildProperties = buildProperties; - PrivateEndpointConnections = privateEndpointConnections; - StagingEnvironmentPolicy = stagingEnvironmentPolicy; - AllowConfigFileUpdates = allowConfigFileUpdates; - TemplateProperties = templateProperties; - ContentDistributionEndpoint = contentDistributionEndpoint; - KeyVaultReferenceIdentity = keyVaultReferenceIdentity; - UserProvidedFunctionApps = userProvidedFunctionApps; - Provider = provider; - EnterpriseGradeCdnStatus = enterpriseGradeCdnStatus; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the default autogenerated hostname for the static site. - /// - [JsonProperty(PropertyName = "properties.defaultHostname")] - public string DefaultHostname { get; private set; } - - /// - /// Gets or sets URL for the repository of the static site. - /// - [JsonProperty(PropertyName = "properties.repositoryUrl")] - public string RepositoryUrl { get; set; } - - /// - /// Gets or sets the target branch in the repository. - /// - [JsonProperty(PropertyName = "properties.branch")] - public string Branch { get; set; } - - /// - /// Gets the custom domains associated with this static site. - /// - [JsonProperty(PropertyName = "properties.customDomains")] - public IList CustomDomains { get; private set; } - - /// - /// Gets or sets a user's github repository token. This is used to - /// setup the Github Actions workflow file and API secrets. - /// - [JsonProperty(PropertyName = "properties.repositoryToken")] - public string RepositoryToken { get; set; } - - /// - /// Gets or sets build properties to configure on the repository. - /// - [JsonProperty(PropertyName = "properties.buildProperties")] - public StaticSiteBuildProperties BuildProperties { get; set; } - - /// - /// Gets private endpoint connections - /// - [JsonProperty(PropertyName = "properties.privateEndpointConnections")] - public IList PrivateEndpointConnections { get; private set; } - - /// - /// Gets or sets state indicating whether staging environments are - /// allowed or not allowed for a static web app. Possible values - /// include: 'Enabled', 'Disabled' - /// - [JsonProperty(PropertyName = "properties.stagingEnvironmentPolicy")] - public StagingEnvironmentPolicy? StagingEnvironmentPolicy { get; set; } - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if - /// config file is locked for this static web app; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.allowConfigFileUpdates")] - public bool? AllowConfigFileUpdates { get; set; } - - /// - /// Gets or sets template options for generating a new repository. - /// - [JsonProperty(PropertyName = "properties.templateProperties")] - public StaticSiteTemplateOptions TemplateProperties { get; set; } - - /// - /// Gets the content distribution endpoint for the static site. - /// - [JsonProperty(PropertyName = "properties.contentDistributionEndpoint")] - public string ContentDistributionEndpoint { get; private set; } - - /// - /// Gets identity to use for Key Vault Reference authentication. - /// - [JsonProperty(PropertyName = "properties.keyVaultReferenceIdentity")] - public string KeyVaultReferenceIdentity { get; private set; } - - /// - /// Gets user provided function apps registered with the static site - /// - [JsonProperty(PropertyName = "properties.userProvidedFunctionApps")] - public IList UserProvidedFunctionApps { get; private set; } - - /// - /// Gets or sets the provider that submitted the last deployment to the - /// primary environment of the static site. - /// - [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; set; } - - /// - /// Gets or sets state indicating the status of the enterprise grade - /// CDN serving traffic to the static web app. Possible values include: - /// 'Enabled', 'Enabling', 'Disabled', 'Disabling' - /// - [JsonProperty(PropertyName = "properties.enterpriseGradeCdnStatus")] - public string EnterpriseGradeCdnStatus { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteResetPropertiesARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteResetPropertiesARMResource.cs deleted file mode 100644 index 337b9ceedcbb..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteResetPropertiesARMResource.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site Reset Properties ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteResetPropertiesARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteResetPropertiesARMResource class. - /// - public StaticSiteResetPropertiesARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteResetPropertiesARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The token which proves admin - /// privileges to the repository. - /// Determines whether the - /// repository should be updated with the new properties. - public StaticSiteResetPropertiesARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repositoryToken = default(string), bool? shouldUpdateRepository = default(bool?)) - : base(id, name, kind, type) - { - RepositoryToken = repositoryToken; - ShouldUpdateRepository = shouldUpdateRepository; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the token which proves admin privileges to the - /// repository. - /// - [JsonProperty(PropertyName = "properties.repositoryToken")] - public string RepositoryToken { get; set; } - - /// - /// Gets or sets determines whether the repository should be updated - /// with the new properties. - /// - [JsonProperty(PropertyName = "properties.shouldUpdateRepository")] - public bool? ShouldUpdateRepository { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs deleted file mode 100644 index ad8cb9674adf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteTemplateOptions.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Template Options for the static site. - /// - public partial class StaticSiteTemplateOptions - { - /// - /// Initializes a new instance of the StaticSiteTemplateOptions class. - /// - public StaticSiteTemplateOptions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteTemplateOptions class. - /// - /// URL of the template repository. - /// The newly generated repository will be based on this one. - /// Owner of the newly generated - /// repository. - /// Name of the newly generated - /// repository. - /// Description of the newly generated - /// repository. - /// Whether or not the newly generated - /// repository is a private repository. Defaults to false (i.e. - /// public). - public StaticSiteTemplateOptions(string templateRepositoryUrl = default(string), string owner = default(string), string repositoryName = default(string), string description = default(string), bool? isPrivate = default(bool?)) - { - TemplateRepositoryUrl = templateRepositoryUrl; - Owner = owner; - RepositoryName = repositoryName; - Description = description; - IsPrivate = isPrivate; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL of the template repository. The newly generated - /// repository will be based on this one. - /// - [JsonProperty(PropertyName = "templateRepositoryUrl")] - public string TemplateRepositoryUrl { get; set; } - - /// - /// Gets or sets owner of the newly generated repository. - /// - [JsonProperty(PropertyName = "owner")] - public string Owner { get; set; } - - /// - /// Gets or sets name of the newly generated repository. - /// - [JsonProperty(PropertyName = "repositoryName")] - public string RepositoryName { get; set; } - - /// - /// Gets or sets description of the newly generated repository. - /// - [JsonProperty(PropertyName = "description")] - public string Description { get; set; } - - /// - /// Gets or sets whether or not the newly generated repository is a - /// private repository. Defaults to false (i.e. public). - /// - [JsonProperty(PropertyName = "isPrivate")] - public bool? IsPrivate { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserARMResource.cs deleted file mode 100644 index 4999de01981e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserARMResource.cs +++ /dev/null @@ -1,87 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site User ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteUserARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSiteUserARMResource class. - /// - public StaticSiteUserARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteUserARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The identity provider for the static site - /// user. - /// The user id for the static site user. - /// The display name for the static site - /// user. - /// The roles for the static site user, in - /// free-form string format - public StaticSiteUserARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string provider = default(string), string userId = default(string), string displayName = default(string), string roles = default(string)) - : base(id, name, kind, type) - { - Provider = provider; - UserId = userId; - DisplayName = displayName; - Roles = roles; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the identity provider for the static site user. - /// - [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; private set; } - - /// - /// Gets the user id for the static site user. - /// - [JsonProperty(PropertyName = "properties.userId")] - public string UserId { get; private set; } - - /// - /// Gets the display name for the static site user. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets or sets the roles for the static site user, in free-form - /// string format - /// - [JsonProperty(PropertyName = "properties.roles")] - public string Roles { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationRequestResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationRequestResource.cs deleted file mode 100644 index 1d33056a11c8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationRequestResource.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static sites user roles invitation resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteUserInvitationRequestResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteUserInvitationRequestResource class. - /// - public StaticSiteUserInvitationRequestResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteUserInvitationRequestResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The domain name for the static site custom - /// domain. - /// The identity provider for the static site - /// user. - /// The user id for the static site - /// user. - /// The roles for the static site user, in - /// free-form string format - /// The number of hours the sas - /// token stays valid - public StaticSiteUserInvitationRequestResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string domain = default(string), string provider = default(string), string userDetails = default(string), string roles = default(string), int? numHoursToExpiration = default(int?)) - : base(id, name, kind, type) - { - Domain = domain; - Provider = provider; - UserDetails = userDetails; - Roles = roles; - NumHoursToExpiration = numHoursToExpiration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the domain name for the static site custom domain. - /// - [JsonProperty(PropertyName = "properties.domain")] - public string Domain { get; set; } - - /// - /// Gets or sets the identity provider for the static site user. - /// - [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; set; } - - /// - /// Gets or sets the user id for the static site user. - /// - [JsonProperty(PropertyName = "properties.userDetails")] - public string UserDetails { get; set; } - - /// - /// Gets or sets the roles for the static site user, in free-form - /// string format - /// - [JsonProperty(PropertyName = "properties.roles")] - public string Roles { get; set; } - - /// - /// Gets or sets the number of hours the sas token stays valid - /// - [JsonProperty(PropertyName = "properties.numHoursToExpiration")] - public int? NumHoursToExpiration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationResponseResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationResponseResource.cs deleted file mode 100644 index dfd32c63e2ce..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserInvitationResponseResource.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static sites user roles invitation link resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteUserInvitationResponseResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteUserInvitationResponseResource class. - /// - public StaticSiteUserInvitationResponseResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteUserInvitationResponseResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The expiration time of the - /// invitation - /// The url for the invitation link - public StaticSiteUserInvitationResponseResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), System.DateTime? expiresOn = default(System.DateTime?), string invitationUrl = default(string)) - : base(id, name, kind, type) - { - ExpiresOn = expiresOn; - InvitationUrl = invitationUrl; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the expiration time of the invitation - /// - [JsonProperty(PropertyName = "properties.expiresOn")] - public System.DateTime? ExpiresOn { get; private set; } - - /// - /// Gets the url for the invitation link - /// - [JsonProperty(PropertyName = "properties.invitationUrl")] - public string InvitationUrl { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs deleted file mode 100644 index d21a687e9567..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionApp.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A static site user provided function. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteUserProvidedFunctionApp : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSiteUserProvidedFunctionApp - /// class. - /// - public StaticSiteUserProvidedFunctionApp() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSiteUserProvidedFunctionApp - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The resource id of the function - /// app registered with the static site - /// The region of the function app - /// registered with the static site - /// The date and time on which the function app - /// was registered with the static site. - public StaticSiteUserProvidedFunctionApp(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionAppResourceId = default(string), string functionAppRegion = default(string), System.DateTime? createdOn = default(System.DateTime?)) - : base(id, name, kind, type) - { - FunctionAppResourceId = functionAppResourceId; - FunctionAppRegion = functionAppRegion; - CreatedOn = createdOn; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the resource id of the function app registered with - /// the static site - /// - [JsonProperty(PropertyName = "properties.functionAppResourceId")] - public string FunctionAppResourceId { get; set; } - - /// - /// Gets or sets the region of the function app registered with the - /// static site - /// - [JsonProperty(PropertyName = "properties.functionAppRegion")] - public string FunctionAppRegion { get; set; } - - /// - /// Gets the date and time on which the function app was registered - /// with the static site. - /// - [JsonProperty(PropertyName = "properties.createdOn")] - public System.DateTime? CreatedOn { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs deleted file mode 100644 index b7652412f1c0..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteUserProvidedFunctionAppARMResource.cs +++ /dev/null @@ -1,83 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static Site User Provided Function App ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteUserProvidedFunctionAppARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteUserProvidedFunctionAppARMResource class. - /// - public StaticSiteUserProvidedFunctionAppARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteUserProvidedFunctionAppARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The resource id of the function - /// app registered with the static site - /// The region of the function app - /// registered with the static site - /// The date and time on which the function app - /// was registered with the static site. - public StaticSiteUserProvidedFunctionAppARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string functionAppResourceId = default(string), string functionAppRegion = default(string), System.DateTime? createdOn = default(System.DateTime?)) - : base(id, name, kind, type) - { - FunctionAppResourceId = functionAppResourceId; - FunctionAppRegion = functionAppRegion; - CreatedOn = createdOn; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the resource id of the function app registered with - /// the static site - /// - [JsonProperty(PropertyName = "properties.functionAppResourceId")] - public string FunctionAppResourceId { get; set; } - - /// - /// Gets or sets the region of the function app registered with the - /// static site - /// - [JsonProperty(PropertyName = "properties.functionAppRegion")] - public string FunctionAppRegion { get; set; } - - /// - /// Gets the date and time on which the function app was registered - /// with the static site. - /// - [JsonProperty(PropertyName = "properties.createdOn")] - public System.DateTime? CreatedOn { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs deleted file mode 100644 index ec3255096a8f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSiteZipDeploymentARMResource.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Static site zip deployment ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSiteZipDeploymentARMResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the - /// StaticSiteZipDeploymentARMResource class. - /// - public StaticSiteZipDeploymentARMResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// StaticSiteZipDeploymentARMResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// URL for the zipped app content - /// URL for the zipped api content - /// A title to label the - /// deployment - /// The provider submitting this - /// deployment - /// The language of the api content, if - /// it exists - public StaticSiteZipDeploymentARMResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string appZipUrl = default(string), string apiZipUrl = default(string), string deploymentTitle = default(string), string provider = default(string), string functionLanguage = default(string)) - : base(id, name, kind, type) - { - AppZipUrl = appZipUrl; - ApiZipUrl = apiZipUrl; - DeploymentTitle = deploymentTitle; - Provider = provider; - FunctionLanguage = functionLanguage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL for the zipped app content - /// - [JsonProperty(PropertyName = "properties.appZipUrl")] - public string AppZipUrl { get; set; } - - /// - /// Gets or sets URL for the zipped api content - /// - [JsonProperty(PropertyName = "properties.apiZipUrl")] - public string ApiZipUrl { get; set; } - - /// - /// Gets or sets a title to label the deployment - /// - [JsonProperty(PropertyName = "properties.deploymentTitle")] - public string DeploymentTitle { get; set; } - - /// - /// Gets or sets the provider submitting this deployment - /// - [JsonProperty(PropertyName = "properties.provider")] - public string Provider { get; set; } - - /// - /// Gets or sets the language of the api content, if it exists - /// - [JsonProperty(PropertyName = "properties.functionLanguage")] - public string FunctionLanguage { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs deleted file mode 100644 index 33b41a8623e2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreview.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Preview for the Static Site Workflow to be generated - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSitesWorkflowPreview : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSitesWorkflowPreview class. - /// - public StaticSitesWorkflowPreview() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSitesWorkflowPreview class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The path for the workflow file to be - /// generated - /// The contents for the workflow file to be - /// generated - public StaticSitesWorkflowPreview(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string path = default(string), string contents = default(string)) - : base(id, name, kind, type) - { - Path = path; - Contents = contents; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets the path for the workflow file to be generated - /// - [JsonProperty(PropertyName = "properties.path")] - public string Path { get; private set; } - - /// - /// Gets the contents for the workflow file to be generated - /// - [JsonProperty(PropertyName = "properties.contents")] - public string Contents { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs deleted file mode 100644 index 98297a655dbd..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StaticSitesWorkflowPreviewRequest.cs +++ /dev/null @@ -1,79 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Request entity for previewing the Static Site workflow - /// - [Rest.Serialization.JsonTransformation] - public partial class StaticSitesWorkflowPreviewRequest : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StaticSitesWorkflowPreviewRequest - /// class. - /// - public StaticSitesWorkflowPreviewRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StaticSitesWorkflowPreviewRequest - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// URL for the repository of the static - /// site. - /// The target branch in the repository. - /// Build properties to configure on the - /// repository. - public StaticSitesWorkflowPreviewRequest(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string repositoryUrl = default(string), string branch = default(string), StaticSiteBuildProperties buildProperties = default(StaticSiteBuildProperties)) - : base(id, name, kind, type) - { - RepositoryUrl = repositoryUrl; - Branch = branch; - BuildProperties = buildProperties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets URL for the repository of the static site. - /// - [JsonProperty(PropertyName = "properties.repositoryUrl")] - public string RepositoryUrl { get; set; } - - /// - /// Gets or sets the target branch in the repository. - /// - [JsonProperty(PropertyName = "properties.branch")] - public string Branch { get; set; } - - /// - /// Gets or sets build properties to configure on the repository. - /// - [JsonProperty(PropertyName = "properties.buildProperties")] - public StaticSiteBuildProperties BuildProperties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs deleted file mode 100644 index c53ab12d6064..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Status.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Identify the status of the most severe insight generated by the - /// detector. - /// - public partial class Status - { - /// - /// Initializes a new instance of the Status class. - /// - public Status() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Status class. - /// - /// Descriptive message. - /// Level of the most severe insight generated - /// by the detector. Possible values include: 'Critical', 'Warning', - /// 'Info', 'Success', 'None' - public Status(string message = default(string), InsightStatus? statusId = default(InsightStatus?)) - { - Message = message; - StatusId = statusId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets descriptive message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - /// - /// Gets or sets level of the most severe insight generated by the - /// detector. Possible values include: 'Critical', 'Warning', 'Info', - /// 'Success', 'None' - /// - [JsonProperty(PropertyName = "statusId")] - public InsightStatus? StatusId { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs deleted file mode 100644 index de810774d66c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesBasedTrigger.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Trigger based on status code. - /// - public partial class StatusCodesBasedTrigger - { - /// - /// Initializes a new instance of the StatusCodesBasedTrigger class. - /// - public StatusCodesBasedTrigger() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StatusCodesBasedTrigger class. - /// - /// HTTP status code. - /// Request Sub Status. - /// Win32 error code. - /// Request Count. - /// Time interval. - /// Request Path - public StatusCodesBasedTrigger(int? status = default(int?), int? subStatus = default(int?), int? win32Status = default(int?), int? count = default(int?), string timeInterval = default(string), string path = default(string)) - { - Status = status; - SubStatus = subStatus; - Win32Status = win32Status; - Count = count; - TimeInterval = timeInterval; - Path = path; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets HTTP status code. - /// - [JsonProperty(PropertyName = "status")] - public int? Status { get; set; } - - /// - /// Gets or sets request Sub Status. - /// - [JsonProperty(PropertyName = "subStatus")] - public int? SubStatus { get; set; } - - /// - /// Gets or sets win32 error code. - /// - [JsonProperty(PropertyName = "win32Status")] - public int? Win32Status { get; set; } - - /// - /// Gets or sets request Count. - /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - - /// - /// Gets or sets time interval. - /// - [JsonProperty(PropertyName = "timeInterval")] - public string TimeInterval { get; set; } - - /// - /// Gets or sets request Path - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs deleted file mode 100644 index e3d3dfe55380..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusCodesRangeBasedTrigger.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Trigger based on range of status codes. - /// - public partial class StatusCodesRangeBasedTrigger - { - /// - /// Initializes a new instance of the StatusCodesRangeBasedTrigger - /// class. - /// - public StatusCodesRangeBasedTrigger() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StatusCodesRangeBasedTrigger - /// class. - /// - /// HTTP status code. - /// Request Count. - /// Time interval. - public StatusCodesRangeBasedTrigger(string statusCodes = default(string), string path = default(string), int? count = default(int?), string timeInterval = default(string)) - { - StatusCodes = statusCodes; - Path = path; - Count = count; - TimeInterval = timeInterval; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets HTTP status code. - /// - [JsonProperty(PropertyName = "statusCodes")] - public string StatusCodes { get; set; } - - /// - /// - [JsonProperty(PropertyName = "path")] - public string Path { get; set; } - - /// - /// Gets or sets request Count. - /// - [JsonProperty(PropertyName = "count")] - public int? Count { get; set; } - - /// - /// Gets or sets time interval. - /// - [JsonProperty(PropertyName = "timeInterval")] - public string TimeInterval { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusOptions.cs deleted file mode 100644 index 979f68191d86..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StatusOptions.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for StatusOptions. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusOptions - { - [EnumMember(Value = "Ready")] - Ready, - [EnumMember(Value = "Pending")] - Pending, - [EnumMember(Value = "Creating")] - Creating - } - internal static class StatusOptionsEnumExtension - { - internal static string ToSerializedValue(this StatusOptions? value) - { - return value == null ? null : ((StatusOptions)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this StatusOptions value) - { - switch( value ) - { - case StatusOptions.Ready: - return "Ready"; - case StatusOptions.Pending: - return "Pending"; - case StatusOptions.Creating: - return "Creating"; - } - return null; - } - - internal static StatusOptions? ParseStatusOptions(this string value) - { - switch( value ) - { - case "Ready": - return StatusOptions.Ready; - case "Pending": - return StatusOptions.Pending; - case "Creating": - return StatusOptions.Creating; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationOptions.cs deleted file mode 100644 index 7b046b435230..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationOptions.cs +++ /dev/null @@ -1,110 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Options for app content migration. - /// - [Rest.Serialization.JsonTransformation] - public partial class StorageMigrationOptions : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StorageMigrationOptions class. - /// - public StorageMigrationOptions() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StorageMigrationOptions class. - /// - /// AzureFiles connection - /// string. - /// AzureFiles share. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// <code>true</code>if the - /// app should be switched over; otherwise, - /// <code>false</code>. - /// <code>true</code> - /// if the app should be read only during copy operation; otherwise, - /// <code>false</code>. - public StorageMigrationOptions(string azurefilesConnectionString, string azurefilesShare, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? switchSiteAfterMigration = default(bool?), bool? blockWriteAccessToSite = default(bool?)) - : base(id, name, kind, type) - { - AzurefilesConnectionString = azurefilesConnectionString; - AzurefilesShare = azurefilesShare; - SwitchSiteAfterMigration = switchSiteAfterMigration; - BlockWriteAccessToSite = blockWriteAccessToSite; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets azureFiles connection string. - /// - [JsonProperty(PropertyName = "properties.azurefilesConnectionString")] - public string AzurefilesConnectionString { get; set; } - - /// - /// Gets or sets azureFiles share. - /// - [JsonProperty(PropertyName = "properties.azurefilesShare")] - public string AzurefilesShare { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt;if the - /// app should be switched over; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.switchSiteAfterMigration")] - public bool? SwitchSiteAfterMigration { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if the - /// app should be read only during copy operation; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.blockWriteAccessToSite")] - public bool? BlockWriteAccessToSite { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AzurefilesConnectionString == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzurefilesConnectionString"); - } - if (AzurefilesShare == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AzurefilesShare"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationResponse.cs deleted file mode 100644 index e40f907ac262..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageMigrationResponse.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Response for a migration of app content request. - /// - [Rest.Serialization.JsonTransformation] - public partial class StorageMigrationResponse : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StorageMigrationResponse class. - /// - public StorageMigrationResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StorageMigrationResponse class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// When server starts the migration process, - /// it will return an operation ID identifying that particular - /// migration operation. - public StorageMigrationResponse(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string operationId = default(string)) - : base(id, name, kind, type) - { - OperationId = operationId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets when server starts the migration process, it will return an - /// operation ID identifying that particular migration operation. - /// - [JsonProperty(PropertyName = "properties.operationId")] - public string OperationId { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs deleted file mode 100644 index 4303d47c3dee..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StorageType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for StorageType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum StorageType - { - [EnumMember(Value = "LocalNode")] - LocalNode, - [EnumMember(Value = "NetworkFileSystem")] - NetworkFileSystem - } - internal static class StorageTypeEnumExtension - { - internal static string ToSerializedValue(this StorageType? value) - { - return value == null ? null : ((StorageType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this StorageType value) - { - switch( value ) - { - case StorageType.LocalNode: - return "LocalNode"; - case StorageType.NetworkFileSystem: - return "NetworkFileSystem"; - } - return null; - } - - internal static StorageType? ParseStorageType(this string value) - { - switch( value ) - { - case "LocalNode": - return StorageType.LocalNode; - case "NetworkFileSystem": - return StorageType.NetworkFileSystem; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringDictionary.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringDictionary.cs deleted file mode 100644 index 99192936fc6d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringDictionary.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// String dictionary resource. - /// - public partial class StringDictionary : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StringDictionary class. - /// - public StringDictionary() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StringDictionary class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Settings. - public StringDictionary(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IDictionary properties = default(IDictionary)) - : base(id, name, kind, type) - { - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets settings. - /// - [JsonProperty(PropertyName = "properties")] - public IDictionary Properties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs deleted file mode 100644 index cb1f2518c84d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/StringList.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// String list resource. - /// - public partial class StringList : ProxyOnlyResource - { - /// - /// Initializes a new instance of the StringList class. - /// - public StringList() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the StringList class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// List of string resources. - public StringList(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList properties = default(IList)) - : base(id, name, kind, type) - { - Properties = properties; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of string resources. - /// - [JsonProperty(PropertyName = "properties")] - public IList Properties { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs deleted file mode 100644 index 46fd238f182d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportTopic.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Defines a unique Support Topic - /// - public partial class SupportTopic - { - /// - /// Initializes a new instance of the SupportTopic class. - /// - public SupportTopic() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SupportTopic class. - /// - /// Support Topic Id - /// Unique resource Id - public SupportTopic(string id = default(string), string pesId = default(string)) - { - Id = id; - PesId = pesId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets support Topic Id - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; private set; } - - /// - /// Gets unique resource Id - /// - [JsonProperty(PropertyName = "pesId")] - public string PesId { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportedTlsVersions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportedTlsVersions.cs deleted file mode 100644 index 2981b1a26125..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SupportedTlsVersions.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for SupportedTlsVersions. - /// - public static class SupportedTlsVersions - { - public const string OneFullStopZero = "1.0"; - public const string OneFullStopOne = "1.1"; - public const string OneFullStopTwo = "1.2"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SwiftVirtualNetwork.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SwiftVirtualNetwork.cs deleted file mode 100644 index 6237c01beb53..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/SwiftVirtualNetwork.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Swift Virtual Network Contract. This is used to enable the new Swift - /// way of doing virtual network integration. - /// - [Rest.Serialization.JsonTransformation] - public partial class SwiftVirtualNetwork : ProxyOnlyResource - { - /// - /// Initializes a new instance of the SwiftVirtualNetwork class. - /// - public SwiftVirtualNetwork() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the SwiftVirtualNetwork class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The Virtual Network subnet's - /// resource ID. This is the subnet that this Web App will join. This - /// subnet must have a delegation to Microsoft.Web/serverFarms defined - /// first. - /// A flag that specifies if the scale - /// unit this Web App is on supports Swift integration. - public SwiftVirtualNetwork(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string subnetResourceId = default(string), bool? swiftSupported = default(bool?)) - : base(id, name, kind, type) - { - SubnetResourceId = subnetResourceId; - SwiftSupported = swiftSupported; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Virtual Network subnet's resource ID. This is the - /// subnet that this Web App will join. This subnet must have a - /// delegation to Microsoft.Web/serverFarms defined first. - /// - [JsonProperty(PropertyName = "properties.subnetResourceId")] - public string SubnetResourceId { get; set; } - - /// - /// Gets or sets a flag that specifies if the scale unit this Web App - /// is on supports Swift integration. - /// - [JsonProperty(PropertyName = "properties.swiftSupported")] - public bool? SwiftSupported { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs deleted file mode 100644 index 5273e17a81ba..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Template.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Container App versioned application definition. - /// Defines the desired state of an immutable revision. - /// Any changes to this section Will result in a new revision being created - /// - public partial class Template - { - /// - /// Initializes a new instance of the Template class. - /// - public Template() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Template class. - /// - /// User friendly suffix that is appended - /// to the revision name - /// List of container definitions for the - /// Container App. - /// Scaling properties for the Container - /// App. - /// Dapr configuration for the Container - /// App. - public Template(string revisionSuffix = default(string), IList containers = default(IList), Scale scale = default(Scale), Dapr dapr = default(Dapr)) - { - RevisionSuffix = revisionSuffix; - Containers = containers; - Scale = scale; - Dapr = dapr; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets user friendly suffix that is appended to the revision - /// name - /// - [JsonProperty(PropertyName = "revisionSuffix")] - public string RevisionSuffix { get; set; } - - /// - /// Gets or sets list of container definitions for the Container App. - /// - [JsonProperty(PropertyName = "containers")] - public IList Containers { get; set; } - - /// - /// Gets or sets scaling properties for the Container App. - /// - [JsonProperty(PropertyName = "scale")] - public Scale Scale { get; set; } - - /// - /// Gets or sets dapr configuration for the Container App. - /// - [JsonProperty(PropertyName = "dapr")] - public Dapr Dapr { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TldLegalAgreement.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TldLegalAgreement.cs deleted file mode 100644 index c5e9fd72b89a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TldLegalAgreement.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Legal agreement for a top level domain. - /// - public partial class TldLegalAgreement - { - /// - /// Initializes a new instance of the TldLegalAgreement class. - /// - public TldLegalAgreement() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TldLegalAgreement class. - /// - /// Unique identifier for the - /// agreement. - /// Agreement title. - /// Agreement details. - /// URL where a copy of the agreement details is - /// hosted. - public TldLegalAgreement(string agreementKey, string title, string content, string url = default(string)) - { - AgreementKey = agreementKey; - Title = title; - Content = content; - Url = url; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets unique identifier for the agreement. - /// - [JsonProperty(PropertyName = "agreementKey")] - public string AgreementKey { get; set; } - - /// - /// Gets or sets agreement title. - /// - [JsonProperty(PropertyName = "title")] - public string Title { get; set; } - - /// - /// Gets or sets agreement details. - /// - [JsonProperty(PropertyName = "content")] - public string Content { get; set; } - - /// - /// Gets or sets URL where a copy of the agreement details is hosted. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (AgreementKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "AgreementKey"); - } - if (Title == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Title"); - } - if (Content == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Content"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs deleted file mode 100644 index 37abd536aaa5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TokenStore.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the token store. - /// - public partial class TokenStore - { - /// - /// Initializes a new instance of the TokenStore class. - /// - public TokenStore() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TokenStore class. - /// - /// <code>true</code> to durably - /// store platform-specific security tokens that are obtained during - /// login flows; otherwise, <code>false</code>. - /// The default is <code>false</code>. - /// The number of hours after - /// session token expiration that a session token can be used to - /// call the token refresh API. The default is 72 hours. - /// The configuration settings of the storage - /// of the tokens if a file system is used. - /// The configuration settings of the - /// storage of the tokens if blob storage is used. - public TokenStore(bool? enabled = default(bool?), double? tokenRefreshExtensionHours = default(double?), FileSystemTokenStore fileSystem = default(FileSystemTokenStore), BlobStorageTokenStore azureBlobStorage = default(BlobStorageTokenStore)) - { - Enabled = enabled; - TokenRefreshExtensionHours = tokenRefreshExtensionHours; - FileSystem = fileSystem; - AzureBlobStorage = azureBlobStorage; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; to - /// durably store platform-specific security tokens that are obtained - /// during login flows; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// The default is &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the number of hours after session token expiration - /// that a session token can be used to - /// call the token refresh API. The default is 72 hours. - /// - [JsonProperty(PropertyName = "tokenRefreshExtensionHours")] - public double? TokenRefreshExtensionHours { get; set; } - - /// - /// Gets or sets the configuration settings of the storage of the - /// tokens if a file system is used. - /// - [JsonProperty(PropertyName = "fileSystem")] - public FileSystemTokenStore FileSystem { get; set; } - - /// - /// Gets or sets the configuration settings of the storage of the - /// tokens if blob storage is used. - /// - [JsonProperty(PropertyName = "azureBlobStorage")] - public BlobStorageTokenStore AzureBlobStorage { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomain.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomain.cs deleted file mode 100644 index 6dec6fc5f030..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomain.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A top level domain object. - /// - [Rest.Serialization.JsonTransformation] - public partial class TopLevelDomain : ProxyOnlyResource - { - /// - /// Initializes a new instance of the TopLevelDomain class. - /// - public TopLevelDomain() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TopLevelDomain class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// If <code>true</code>, then the - /// top level domain supports domain privacy; otherwise, - /// <code>false</code>. - public TopLevelDomain(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), bool? privacy = default(bool?)) - : base(id, name, kind, type) - { - Privacy = privacy; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, then - /// the top level domain supports domain privacy; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.privacy")] - public bool? Privacy { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomainAgreementOption.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomainAgreementOption.cs deleted file mode 100644 index 668cbcf92351..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TopLevelDomainAgreementOption.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Options for retrieving the list of top level domain legal agreements. - /// - public partial class TopLevelDomainAgreementOption - { - /// - /// Initializes a new instance of the TopLevelDomainAgreementOption - /// class. - /// - public TopLevelDomainAgreementOption() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TopLevelDomainAgreementOption - /// class. - /// - /// If <code>true</code>, then - /// the list of agreements will include agreements for domain privacy - /// as well; otherwise, <code>false</code>. - /// If <code>true</code>, then - /// the list of agreements will include agreements for domain transfer - /// as well; otherwise, <code>false</code>. - public TopLevelDomainAgreementOption(bool? includePrivacy = default(bool?), bool? forTransfer = default(bool?)) - { - IncludePrivacy = includePrivacy; - ForTransfer = forTransfer; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, then - /// the list of agreements will include agreements for domain privacy - /// as well; otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "includePrivacy")] - public bool? IncludePrivacy { get; set; } - - /// - /// Gets or sets if &lt;code&gt;true&lt;/code&gt;, then - /// the list of agreements will include agreements for domain transfer - /// as well; otherwise, &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "forTransfer")] - public bool? ForTransfer { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs deleted file mode 100644 index c097f640232e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TrafficWeight.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Traffic weight assigned to a revision - /// - public partial class TrafficWeight - { - /// - /// Initializes a new instance of the TrafficWeight class. - /// - public TrafficWeight() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TrafficWeight class. - /// - /// Name of a revision - /// Traffic weight assigned to a revision - /// Indicates that the traffic weight - /// belongs to a latest stable revision - public TrafficWeight(string revisionName = default(string), int? weight = default(int?), bool? latestRevision = default(bool?)) - { - RevisionName = revisionName; - Weight = weight; - LatestRevision = latestRevision; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets name of a revision - /// - [JsonProperty(PropertyName = "revisionName")] - public string RevisionName { get; set; } - - /// - /// Gets or sets traffic weight assigned to a revision - /// - [JsonProperty(PropertyName = "weight")] - public int? Weight { get; set; } - - /// - /// Gets or sets indicates that the traffic weight belongs to a latest - /// stable revision - /// - [JsonProperty(PropertyName = "latestRevision")] - public bool? LatestRevision { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggerTypes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggerTypes.cs deleted file mode 100644 index e957c41f46ed..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggerTypes.cs +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for TriggerTypes. - /// - public static class TriggerTypes - { - public const string HttpTrigger = "HttpTrigger"; - public const string Unknown = "Unknown"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobHistory.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobHistory.cs deleted file mode 100644 index cb058d3cd9c3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobHistory.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Triggered Web Job History. List of Triggered Web Job Run Information - /// elements. - /// - [Rest.Serialization.JsonTransformation] - public partial class TriggeredJobHistory : ProxyOnlyResource - { - /// - /// Initializes a new instance of the TriggeredJobHistory class. - /// - public TriggeredJobHistory() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TriggeredJobHistory class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// List of triggered web job runs. - public TriggeredJobHistory(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), IList runs = default(IList)) - : base(id, name, kind, type) - { - Runs = runs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets list of triggered web job runs. - /// - [JsonProperty(PropertyName = "properties.runs")] - public IList Runs { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs deleted file mode 100644 index a79fef356dc4..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredJobRun.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Triggered Web Job Run Information. - /// - public partial class TriggeredJobRun - { - /// - /// Initializes a new instance of the TriggeredJobRun class. - /// - public TriggeredJobRun() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TriggeredJobRun class. - /// - /// Job ID. - /// Job name. - /// Job status. Possible values include: - /// 'Success', 'Failed', 'Error' - /// Start time. - /// End time. - /// Job duration. - /// Output URL. - /// Error URL. - /// Job URL. - /// Job name. - /// Job trigger. - public TriggeredJobRun(string webJobId = default(string), string webJobName = default(string), TriggeredWebJobStatus? status = default(TriggeredWebJobStatus?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), string duration = default(string), string outputUrl = default(string), string errorUrl = default(string), string url = default(string), string jobName = default(string), string trigger = default(string)) - { - WebJobId = webJobId; - WebJobName = webJobName; - Status = status; - StartTime = startTime; - EndTime = endTime; - Duration = duration; - OutputUrl = outputUrl; - ErrorUrl = errorUrl; - Url = url; - JobName = jobName; - Trigger = trigger; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets job ID. - /// - [JsonProperty(PropertyName = "web_job_id")] - public string WebJobId { get; set; } - - /// - /// Gets or sets job name. - /// - [JsonProperty(PropertyName = "web_job_name")] - public string WebJobName { get; set; } - - /// - /// Gets or sets job status. Possible values include: 'Success', - /// 'Failed', 'Error' - /// - [JsonProperty(PropertyName = "status")] - public TriggeredWebJobStatus? Status { get; set; } - - /// - /// Gets or sets start time. - /// - [JsonProperty(PropertyName = "start_time")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets end time. - /// - [JsonProperty(PropertyName = "end_time")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets job duration. - /// - [JsonProperty(PropertyName = "duration")] - public string Duration { get; set; } - - /// - /// Gets or sets output URL. - /// - [JsonProperty(PropertyName = "output_url")] - public string OutputUrl { get; set; } - - /// - /// Gets or sets error URL. - /// - [JsonProperty(PropertyName = "error_url")] - public string ErrorUrl { get; set; } - - /// - /// Gets or sets job URL. - /// - [JsonProperty(PropertyName = "url")] - public string Url { get; set; } - - /// - /// Gets or sets job name. - /// - [JsonProperty(PropertyName = "job_name")] - public string JobName { get; set; } - - /// - /// Gets or sets job trigger. - /// - [JsonProperty(PropertyName = "trigger")] - public string Trigger { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJob.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJob.cs deleted file mode 100644 index e22db3b35e2e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJob.cs +++ /dev/null @@ -1,135 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Triggered Web Job Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class TriggeredWebJob : ProxyOnlyResource - { - /// - /// Initializes a new instance of the TriggeredWebJob class. - /// - public TriggeredWebJob() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TriggeredWebJob class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Latest job run information. - /// History URL. - /// Scheduler Logs URL. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. Possible values include: - /// 'Continuous', 'Triggered' - /// Error information. - /// Using SDK? - /// Job settings. - public TriggeredWebJob(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), TriggeredJobRun latestRun = default(TriggeredJobRun), string historyUrl = default(string), string schedulerLogsUrl = default(string), string runCommand = default(string), string url = default(string), string extraInfoUrl = default(string), WebJobType? webJobType = default(WebJobType?), string error = default(string), bool? usingSdk = default(bool?), IDictionary settings = default(IDictionary)) - : base(id, name, kind, type) - { - LatestRun = latestRun; - HistoryUrl = historyUrl; - SchedulerLogsUrl = schedulerLogsUrl; - RunCommand = runCommand; - Url = url; - ExtraInfoUrl = extraInfoUrl; - WebJobType = webJobType; - Error = error; - UsingSdk = usingSdk; - Settings = settings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets latest job run information. - /// - [JsonProperty(PropertyName = "properties.latest_run")] - public TriggeredJobRun LatestRun { get; set; } - - /// - /// Gets or sets history URL. - /// - [JsonProperty(PropertyName = "properties.history_url")] - public string HistoryUrl { get; set; } - - /// - /// Gets or sets scheduler Logs URL. - /// - [JsonProperty(PropertyName = "properties.scheduler_logs_url")] - public string SchedulerLogsUrl { get; set; } - - /// - /// Gets or sets run command. - /// - [JsonProperty(PropertyName = "properties.run_command")] - public string RunCommand { get; set; } - - /// - /// Gets or sets job URL. - /// - [JsonProperty(PropertyName = "properties.url")] - public string Url { get; set; } - - /// - /// Gets or sets extra Info URL. - /// - [JsonProperty(PropertyName = "properties.extra_info_url")] - public string ExtraInfoUrl { get; set; } - - /// - /// Gets or sets job type. Possible values include: 'Continuous', - /// 'Triggered' - /// - [JsonProperty(PropertyName = "properties.web_job_type")] - public WebJobType? WebJobType { get; set; } - - /// - /// Gets or sets error information. - /// - [JsonProperty(PropertyName = "properties.error")] - public string Error { get; set; } - - /// - /// Gets or sets using SDK? - /// - [JsonProperty(PropertyName = "properties.using_sdk")] - public bool? UsingSdk { get; set; } - - /// - /// Gets or sets job settings. - /// - [JsonProperty(PropertyName = "properties.settings")] - public IDictionary Settings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJobStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJobStatus.cs deleted file mode 100644 index 9afa65b95772..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TriggeredWebJobStatus.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for TriggeredWebJobStatus. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TriggeredWebJobStatus - { - [EnumMember(Value = "Success")] - Success, - [EnumMember(Value = "Failed")] - Failed, - [EnumMember(Value = "Error")] - Error - } - internal static class TriggeredWebJobStatusEnumExtension - { - internal static string ToSerializedValue(this TriggeredWebJobStatus? value) - { - return value == null ? null : ((TriggeredWebJobStatus)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this TriggeredWebJobStatus value) - { - switch( value ) - { - case TriggeredWebJobStatus.Success: - return "Success"; - case TriggeredWebJobStatus.Failed: - return "Failed"; - case TriggeredWebJobStatus.Error: - return "Error"; - } - return null; - } - - internal static TriggeredWebJobStatus? ParseTriggeredWebJobStatus(this string value) - { - switch( value ) - { - case "Success": - return TriggeredWebJobStatus.Success; - case "Failed": - return TriggeredWebJobStatus.Failed; - case "Error": - return TriggeredWebJobStatus.Error; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs deleted file mode 100644 index 75b4126e49b3..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Twitter.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the Twitter provider. - /// - public partial class Twitter - { - /// - /// Initializes a new instance of the Twitter class. - /// - public Twitter() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Twitter class. - /// - /// <code>false</code> if the Twitter - /// provider should not be enabled despite the set registration; - /// otherwise, <code>true</code>. - /// The configuration settings of the app - /// registration for the Twitter provider. - public Twitter(bool? enabled = default(bool?), TwitterRegistration registration = default(TwitterRegistration)) - { - Enabled = enabled; - Registration = registration; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets &lt;code&gt;false&lt;/code&gt; if the - /// Twitter provider should not be enabled despite the set - /// registration; otherwise, - /// &lt;code&gt;true&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "enabled")] - public bool? Enabled { get; set; } - - /// - /// Gets or sets the configuration settings of the app registration for - /// the Twitter provider. - /// - [JsonProperty(PropertyName = "registration")] - public TwitterRegistration Registration { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs deleted file mode 100644 index 9ff08bb3bcd8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/TwitterRegistration.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// The configuration settings of the app registration for the Twitter - /// provider. - /// - public partial class TwitterRegistration - { - /// - /// Initializes a new instance of the TwitterRegistration class. - /// - public TwitterRegistration() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the TwitterRegistration class. - /// - /// The OAuth 1.0a consumer key of the - /// Twitter application used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: - /// https://dev.twitter.com/web/sign-in - /// The app setting name that - /// contains the OAuth 1.0a consumer secret of the Twitter - /// application used for sign-in. - public TwitterRegistration(string consumerKey = default(string), string consumerSecretSettingName = default(string)) - { - ConsumerKey = consumerKey; - ConsumerSecretSettingName = consumerSecretSettingName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the OAuth 1.0a consumer key of the Twitter application - /// used for sign-in. - /// This setting is required for enabling Twitter Sign-In. - /// Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in - /// - [JsonProperty(PropertyName = "consumerKey")] - public string ConsumerKey { get; set; } - - /// - /// Gets or sets the app setting name that contains the OAuth 1.0a - /// consumer secret of the Twitter - /// application used for sign-in. - /// - [JsonProperty(PropertyName = "consumerSecretSettingName")] - public string ConsumerSecretSettingName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientAction.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientAction.cs deleted file mode 100644 index 631531f54026..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientAction.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for UnauthenticatedClientAction. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum UnauthenticatedClientAction - { - [EnumMember(Value = "RedirectToLoginPage")] - RedirectToLoginPage, - [EnumMember(Value = "AllowAnonymous")] - AllowAnonymous - } - internal static class UnauthenticatedClientActionEnumExtension - { - internal static string ToSerializedValue(this UnauthenticatedClientAction? value) - { - return value == null ? null : ((UnauthenticatedClientAction)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this UnauthenticatedClientAction value) - { - switch( value ) - { - case UnauthenticatedClientAction.RedirectToLoginPage: - return "RedirectToLoginPage"; - case UnauthenticatedClientAction.AllowAnonymous: - return "AllowAnonymous"; - } - return null; - } - - internal static UnauthenticatedClientAction? ParseUnauthenticatedClientAction(this string value) - { - switch( value ) - { - case "RedirectToLoginPage": - return UnauthenticatedClientAction.RedirectToLoginPage; - case "AllowAnonymous": - return UnauthenticatedClientAction.AllowAnonymous; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientActionV2.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientActionV2.cs deleted file mode 100644 index c9ec41bec5ee..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UnauthenticatedClientActionV2.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for UnauthenticatedClientActionV2. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum UnauthenticatedClientActionV2 - { - [EnumMember(Value = "RedirectToLoginPage")] - RedirectToLoginPage, - [EnumMember(Value = "AllowAnonymous")] - AllowAnonymous, - [EnumMember(Value = "Return401")] - Return401, - [EnumMember(Value = "Return403")] - Return403 - } - internal static class UnauthenticatedClientActionV2EnumExtension - { - internal static string ToSerializedValue(this UnauthenticatedClientActionV2? value) - { - return value == null ? null : ((UnauthenticatedClientActionV2)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this UnauthenticatedClientActionV2 value) - { - switch( value ) - { - case UnauthenticatedClientActionV2.RedirectToLoginPage: - return "RedirectToLoginPage"; - case UnauthenticatedClientActionV2.AllowAnonymous: - return "AllowAnonymous"; - case UnauthenticatedClientActionV2.Return401: - return "Return401"; - case UnauthenticatedClientActionV2.Return403: - return "Return403"; - } - return null; - } - - internal static UnauthenticatedClientActionV2? ParseUnauthenticatedClientActionV2(this string value) - { - switch( value ) - { - case "RedirectToLoginPage": - return UnauthenticatedClientActionV2.RedirectToLoginPage; - case "AllowAnonymous": - return UnauthenticatedClientActionV2.AllowAnonymous; - case "Return401": - return UnauthenticatedClientActionV2.Return401; - case "Return403": - return UnauthenticatedClientActionV2.Return403; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Usage.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Usage.cs deleted file mode 100644 index 3a3b84a8828b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/Usage.cs +++ /dev/null @@ -1,120 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Usage of the quota resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class Usage : ProxyOnlyResource - { - /// - /// Initializes a new instance of the Usage class. - /// - public Usage() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the Usage class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Friendly name shown in the UI. - /// Name of the quota resource. - /// Units of measurement for the quota - /// resource. - /// The current value of the resource - /// counter. - /// The resource limit. - /// Next reset time for the resource - /// counter. - /// Compute mode used for this usage. - /// Possible values include: 'Shared', 'Dedicated', 'Dynamic' - /// Site mode used for this usage. - public Usage(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string displayName = default(string), string resourceName = default(string), string unit = default(string), long? currentValue = default(long?), long? limit = default(long?), System.DateTime? nextResetTime = default(System.DateTime?), ComputeModeOptions? computeMode = default(ComputeModeOptions?), string siteMode = default(string)) - : base(id, name, kind, type) - { - DisplayName = displayName; - ResourceName = resourceName; - Unit = unit; - CurrentValue = currentValue; - Limit = limit; - NextResetTime = nextResetTime; - ComputeMode = computeMode; - SiteMode = siteMode; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets friendly name shown in the UI. - /// - [JsonProperty(PropertyName = "properties.displayName")] - public string DisplayName { get; private set; } - - /// - /// Gets name of the quota resource. - /// - [JsonProperty(PropertyName = "properties.resourceName")] - public string ResourceName { get; private set; } - - /// - /// Gets units of measurement for the quota resource. - /// - [JsonProperty(PropertyName = "properties.unit")] - public string Unit { get; private set; } - - /// - /// Gets the current value of the resource counter. - /// - [JsonProperty(PropertyName = "properties.currentValue")] - public long? CurrentValue { get; private set; } - - /// - /// Gets the resource limit. - /// - [JsonProperty(PropertyName = "properties.limit")] - public long? Limit { get; private set; } - - /// - /// Gets next reset time for the resource counter. - /// - [JsonProperty(PropertyName = "properties.nextResetTime")] - public System.DateTime? NextResetTime { get; private set; } - - /// - /// Gets compute mode used for this usage. Possible values include: - /// 'Shared', 'Dedicated', 'Dynamic' - /// - [JsonProperty(PropertyName = "properties.computeMode")] - public ComputeModeOptions? ComputeMode { get; private set; } - - /// - /// Gets site mode used for this usage. - /// - [JsonProperty(PropertyName = "properties.siteMode")] - public string SiteMode { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UsageState.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UsageState.cs deleted file mode 100644 index ec63bc2a7d9d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UsageState.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for UsageState. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum UsageState - { - [EnumMember(Value = "Normal")] - Normal, - [EnumMember(Value = "Exceeded")] - Exceeded - } - internal static class UsageStateEnumExtension - { - internal static string ToSerializedValue(this UsageState? value) - { - return value == null ? null : ((UsageState)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this UsageState value) - { - switch( value ) - { - case UsageState.Normal: - return "Normal"; - case UsageState.Exceeded: - return "Exceeded"; - } - return null; - } - - internal static UsageState? ParseUsageState(this string value) - { - switch( value ) - { - case "Normal": - return UsageState.Normal; - case "Exceeded": - return UsageState.Exceeded; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/User.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/User.cs deleted file mode 100644 index c35bdf513eca..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/User.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// User credentials used for publishing activity. - /// - [Rest.Serialization.JsonTransformation] - public partial class User : ProxyOnlyResource - { - /// - /// Initializes a new instance of the User class. - /// - public User() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the User class. - /// - /// Username used for - /// publishing. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Password used for - /// publishing. - /// Password hash used for - /// publishing. - /// Password hash salt used - /// for publishing. - /// Url of SCM site. - public User(string publishingUserName, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string publishingPassword = default(string), string publishingPasswordHash = default(string), string publishingPasswordHashSalt = default(string), string scmUri = default(string)) - : base(id, name, kind, type) - { - PublishingUserName = publishingUserName; - PublishingPassword = publishingPassword; - PublishingPasswordHash = publishingPasswordHash; - PublishingPasswordHashSalt = publishingPasswordHashSalt; - ScmUri = scmUri; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets username used for publishing. - /// - [JsonProperty(PropertyName = "properties.publishingUserName")] - public string PublishingUserName { get; set; } - - /// - /// Gets or sets password used for publishing. - /// - [JsonProperty(PropertyName = "properties.publishingPassword")] - public string PublishingPassword { get; set; } - - /// - /// Gets or sets password hash used for publishing. - /// - [JsonProperty(PropertyName = "properties.publishingPasswordHash")] - public string PublishingPasswordHash { get; set; } - - /// - /// Gets or sets password hash salt used for publishing. - /// - [JsonProperty(PropertyName = "properties.publishingPasswordHashSalt")] - public string PublishingPasswordHashSalt { get; set; } - - /// - /// Gets or sets url of SCM site. - /// - [JsonProperty(PropertyName = "properties.scmUri")] - public string ScmUri { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (PublishingUserName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "PublishingUserName"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs deleted file mode 100644 index f1f373fbdc70..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/UserAssignedIdentity.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// User Assigned identity. - /// - public partial class UserAssignedIdentity - { - /// - /// Initializes a new instance of the UserAssignedIdentity class. - /// - public UserAssignedIdentity() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the UserAssignedIdentity class. - /// - /// Principal Id of user assigned - /// identity - /// Client Id of user assigned identity - public UserAssignedIdentity(string principalId = default(string), string clientId = default(string)) - { - PrincipalId = principalId; - ClientId = clientId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets principal Id of user assigned identity - /// - [JsonProperty(PropertyName = "principalId")] - public string PrincipalId { get; private set; } - - /// - /// Gets client Id of user assigned identity - /// - [JsonProperty(PropertyName = "clientId")] - public string ClientId { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs deleted file mode 100644 index cfab40caac5c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateRequest.cs +++ /dev/null @@ -1,237 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Resource validation request content. - /// - [Rest.Serialization.JsonTransformation] - public partial class ValidateRequest - { - /// - /// Initializes a new instance of the ValidateRequest class. - /// - public ValidateRequest() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ValidateRequest class. - /// - /// Resource name to verify. - /// Resource type used for verification. Possible - /// values include: 'ServerFarm', 'Site', - /// 'Microsoft.Web/hostingEnvironments' - /// Expected location of the resource. - /// ARM resource ID of an App Service plan - /// that would host the app. - /// Name of the target SKU for the App Service - /// plan. - /// <code>true</code> if App - /// Service plan is for Linux workers; otherwise, - /// <code>false</code>. - /// <code>true</code> if App Service - /// plan is for Spot instances; otherwise, - /// <code>false</code>. - /// Target capacity of the App Service plan - /// (number of VMs). - /// Name of App Service Environment - /// where app or App Service plan should be created. - /// <code>true</code> if App Service - /// plan is running as a windows container - /// Base URL of the container - /// registry - /// Username for to access the - /// container registry - /// Password for to access the - /// container registry - /// Repository name (image - /// name) - /// Image tag - /// Platform (windows or - /// linux) - /// App Service Environment - /// Properties - public ValidateRequest(string name, string type, string location, string serverFarmId = default(string), string skuName = default(string), bool? needLinuxWorkers = default(bool?), bool? isSpot = default(bool?), int? capacity = default(int?), string hostingEnvironment = default(string), bool? isXenon = default(bool?), string containerRegistryBaseUrl = default(string), string containerRegistryUsername = default(string), string containerRegistryPassword = default(string), string containerImageRepository = default(string), string containerImageTag = default(string), string containerImagePlatform = default(string), AppServiceEnvironment appServiceEnvironment = default(AppServiceEnvironment)) - { - Name = name; - Type = type; - Location = location; - ServerFarmId = serverFarmId; - SkuName = skuName; - NeedLinuxWorkers = needLinuxWorkers; - IsSpot = isSpot; - Capacity = capacity; - HostingEnvironment = hostingEnvironment; - IsXenon = isXenon; - ContainerRegistryBaseUrl = containerRegistryBaseUrl; - ContainerRegistryUsername = containerRegistryUsername; - ContainerRegistryPassword = containerRegistryPassword; - ContainerImageRepository = containerImageRepository; - ContainerImageTag = containerImageTag; - ContainerImagePlatform = containerImagePlatform; - AppServiceEnvironment = appServiceEnvironment; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource name to verify. - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; set; } - - /// - /// Gets or sets resource type used for verification. Possible values - /// include: 'ServerFarm', 'Site', 'Microsoft.Web/hostingEnvironments' - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; set; } - - /// - /// Gets or sets expected location of the resource. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; set; } - - /// - /// Gets or sets ARM resource ID of an App Service plan that would host - /// the app. - /// - [JsonProperty(PropertyName = "properties.serverFarmId")] - public string ServerFarmId { get; set; } - - /// - /// Gets or sets name of the target SKU for the App Service plan. - /// - [JsonProperty(PropertyName = "properties.skuName")] - public string SkuName { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if App - /// Service plan is for Linux workers; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.needLinuxWorkers")] - public bool? NeedLinuxWorkers { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if App - /// Service plan is for Spot instances; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.isSpot")] - public bool? IsSpot { get; set; } - - /// - /// Gets or sets target capacity of the App Service plan (number of - /// VMs). - /// - [JsonProperty(PropertyName = "properties.capacity")] - public int? Capacity { get; set; } - - /// - /// Gets or sets name of App Service Environment where app or App - /// Service plan should be created. - /// - [JsonProperty(PropertyName = "properties.hostingEnvironment")] - public string HostingEnvironment { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if App - /// Service plan is running as a windows container - /// - [JsonProperty(PropertyName = "properties.isXenon")] - public bool? IsXenon { get; set; } - - /// - /// Gets or sets base URL of the container registry - /// - [JsonProperty(PropertyName = "properties.containerRegistryBaseUrl")] - public string ContainerRegistryBaseUrl { get; set; } - - /// - /// Gets or sets username for to access the container registry - /// - [JsonProperty(PropertyName = "properties.containerRegistryUsername")] - public string ContainerRegistryUsername { get; set; } - - /// - /// Gets or sets password for to access the container registry - /// - [JsonProperty(PropertyName = "properties.containerRegistryPassword")] - public string ContainerRegistryPassword { get; set; } - - /// - /// Gets or sets repository name (image name) - /// - [JsonProperty(PropertyName = "properties.containerImageRepository")] - public string ContainerImageRepository { get; set; } - - /// - /// Gets or sets image tag - /// - [JsonProperty(PropertyName = "properties.containerImageTag")] - public string ContainerImageTag { get; set; } - - /// - /// Gets or sets platform (windows or linux) - /// - [JsonProperty(PropertyName = "properties.containerImagePlatform")] - public string ContainerImagePlatform { get; set; } - - /// - /// Gets or sets app Service Environment Properties - /// - [JsonProperty(PropertyName = "properties.appServiceEnvironment")] - public AppServiceEnvironment AppServiceEnvironment { 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"); - } - if (Location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Location"); - } - if (Capacity < 1) - { - throw new ValidationException(ValidationRules.InclusiveMinimum, "Capacity", 1); - } - if (AppServiceEnvironment != null) - { - AppServiceEnvironment.Validate(); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs deleted file mode 100644 index 1c771a665519..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResourceTypes.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - - /// - /// Defines values for ValidateResourceTypes. - /// - public static class ValidateResourceTypes - { - public const string ServerFarm = "ServerFarm"; - public const string Site = "Site"; - public const string MicrosoftWebHostingEnvironments = "Microsoft.Web/hostingEnvironments"; - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponse.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponse.cs deleted file mode 100644 index 303a58c68912..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponse.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the result of resource validation. - /// - public partial class ValidateResponse - { - /// - /// Initializes a new instance of the ValidateResponse class. - /// - public ValidateResponse() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ValidateResponse class. - /// - /// Result of validation. - /// Error details for the case when validation - /// fails. - public ValidateResponse(string status = default(string), ValidateResponseError error = default(ValidateResponseError)) - { - Status = status; - Error = error; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets result of validation. - /// - [JsonProperty(PropertyName = "status")] - public string Status { get; set; } - - /// - /// Gets or sets error details for the case when validation fails. - /// - [JsonProperty(PropertyName = "error")] - public ValidateResponseError Error { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponseError.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponseError.cs deleted file mode 100644 index 6833ce082cb9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/ValidateResponseError.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Error details for when validation fails. - /// - public partial class ValidateResponseError - { - /// - /// Initializes a new instance of the ValidateResponseError class. - /// - public ValidateResponseError() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the ValidateResponseError class. - /// - /// Validation error code. - /// Validation error message. - public ValidateResponseError(string code = default(string), string message = default(string)) - { - Code = code; - Message = message; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets validation error code. - /// - [JsonProperty(PropertyName = "code")] - public string Code { get; set; } - - /// - /// Gets or sets validation error message. - /// - [JsonProperty(PropertyName = "message")] - public string Message { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualApplication.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualApplication.cs deleted file mode 100644 index d9c0900c3687..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualApplication.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Virtual application in an app. - /// - public partial class VirtualApplication - { - /// - /// Initializes a new instance of the VirtualApplication class. - /// - public VirtualApplication() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualApplication class. - /// - /// Virtual path. - /// Physical path. - /// <code>true</code> if - /// preloading is enabled; otherwise, - /// <code>false</code>. - /// Virtual directories for virtual - /// application. - public VirtualApplication(string virtualPath = default(string), string physicalPath = default(string), bool? preloadEnabled = default(bool?), IList virtualDirectories = default(IList)) - { - VirtualPath = virtualPath; - PhysicalPath = physicalPath; - PreloadEnabled = preloadEnabled; - VirtualDirectories = virtualDirectories; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets virtual path. - /// - [JsonProperty(PropertyName = "virtualPath")] - public string VirtualPath { get; set; } - - /// - /// Gets or sets physical path. - /// - [JsonProperty(PropertyName = "physicalPath")] - public string PhysicalPath { get; set; } - - /// - /// Gets or sets &lt;code&gt;true&lt;/code&gt; if - /// preloading is enabled; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "preloadEnabled")] - public bool? PreloadEnabled { get; set; } - - /// - /// Gets or sets virtual directories for virtual application. - /// - [JsonProperty(PropertyName = "virtualDirectories")] - public IList VirtualDirectories { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualDirectory.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualDirectory.cs deleted file mode 100644 index 16fbc5f1d8b9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualDirectory.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Directory for virtual application. - /// - public partial class VirtualDirectory - { - /// - /// Initializes a new instance of the VirtualDirectory class. - /// - public VirtualDirectory() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualDirectory class. - /// - /// Path to virtual application. - /// Physical path. - public VirtualDirectory(string virtualPath = default(string), string physicalPath = default(string)) - { - VirtualPath = virtualPath; - PhysicalPath = physicalPath; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets path to virtual application. - /// - [JsonProperty(PropertyName = "virtualPath")] - public string VirtualPath { get; set; } - - /// - /// Gets or sets physical path. - /// - [JsonProperty(PropertyName = "physicalPath")] - public string PhysicalPath { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualIPMapping.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualIPMapping.cs deleted file mode 100644 index c5d70ef7c71e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualIPMapping.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Virtual IP mapping. - /// - public partial class VirtualIPMapping - { - /// - /// Initializes a new instance of the VirtualIPMapping class. - /// - public VirtualIPMapping() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualIPMapping class. - /// - /// Virtual IP address. - /// Internal HTTP port. - /// Internal HTTPS port. - /// Is virtual IP mapping in use. - /// name of the service that virtual IP is - /// assigned to - public VirtualIPMapping(string virtualIP = default(string), int? internalHttpPort = default(int?), int? internalHttpsPort = default(int?), bool? inUse = default(bool?), string serviceName = default(string)) - { - VirtualIP = virtualIP; - InternalHttpPort = internalHttpPort; - InternalHttpsPort = internalHttpsPort; - InUse = inUse; - ServiceName = serviceName; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets virtual IP address. - /// - [JsonProperty(PropertyName = "virtualIP")] - public string VirtualIP { get; set; } - - /// - /// Gets or sets internal HTTP port. - /// - [JsonProperty(PropertyName = "internalHttpPort")] - public int? InternalHttpPort { get; set; } - - /// - /// Gets or sets internal HTTPS port. - /// - [JsonProperty(PropertyName = "internalHttpsPort")] - public int? InternalHttpsPort { get; set; } - - /// - /// Gets or sets is virtual IP mapping in use. - /// - [JsonProperty(PropertyName = "inUse")] - public bool? InUse { get; set; } - - /// - /// Gets or sets name of the service that virtual IP is assigned to - /// - [JsonProperty(PropertyName = "serviceName")] - public string ServiceName { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs deleted file mode 100644 index 55e03d256121..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VirtualNetworkProfile.cs +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Specification for using a Virtual Network. - /// - public partial class VirtualNetworkProfile - { - /// - /// Initializes a new instance of the VirtualNetworkProfile class. - /// - public VirtualNetworkProfile() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualNetworkProfile class. - /// - /// Resource id of the Virtual Network. - /// Name of the Virtual Network (read-only). - /// Resource type of the Virtual Network - /// (read-only). - /// Subnet within the Virtual Network. - public VirtualNetworkProfile(string id, string name = default(string), string type = default(string), string subnet = default(string)) - { - Id = id; - Name = name; - Type = type; - Subnet = subnet; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets resource id of the Virtual Network. - /// - [JsonProperty(PropertyName = "id")] - public string Id { get; set; } - - /// - /// Gets name of the Virtual Network (read-only). - /// - [JsonProperty(PropertyName = "name")] - public string Name { get; private set; } - - /// - /// Gets resource type of the Virtual Network (read-only). - /// - [JsonProperty(PropertyName = "type")] - public string Type { get; private set; } - - /// - /// Gets or sets subnet within the Virtual Network. - /// - [JsonProperty(PropertyName = "subnet")] - public string Subnet { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (Id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "Id"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetGateway.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetGateway.cs deleted file mode 100644 index f1e125c9e20d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetGateway.cs +++ /dev/null @@ -1,82 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The Virtual Network gateway contract. This is used to give the Virtual - /// Network gateway access to the VPN package. - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetGateway : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetGateway class. - /// - public VnetGateway() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetGateway class. - /// - /// The URI where the VPN package can be - /// downloaded. - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The Virtual Network name. - public VnetGateway(string vpnPackageUri, string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetName = default(string)) - : base(id, name, kind, type) - { - VnetName = vnetName; - VpnPackageUri = vpnPackageUri; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Virtual Network name. - /// - [JsonProperty(PropertyName = "properties.vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets the URI where the VPN package can be downloaded. - /// - [JsonProperty(PropertyName = "properties.vpnPackageUri")] - public string VpnPackageUri { get; set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public virtual void Validate() - { - if (VpnPackageUri == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "VpnPackageUri"); - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs deleted file mode 100644 index d2ddf8a0f85e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfo.cs +++ /dev/null @@ -1,116 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Virtual Network information contract. - /// - public partial class VnetInfo - { - /// - /// Initializes a new instance of the VnetInfo class. - /// - public VnetInfo() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetInfo class. - /// - /// The Virtual Network's resource - /// ID. - /// The client certificate - /// thumbprint. - /// A certificate file (.cer) blob containing - /// the public key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// The routes that this Virtual Network - /// connection uses. - /// <code>true</code> if a - /// resync is required; otherwise, - /// <code>false</code>. - /// DNS servers to be used by this Virtual - /// Network. This should be a comma-separated list of IP - /// addresses. - /// Flag that is used to denote if this is VNET - /// injection - public VnetInfo(string vnetResourceId = default(string), string certThumbprint = default(string), string certBlob = default(string), IList routes = default(IList), bool? resyncRequired = default(bool?), string dnsServers = default(string), bool? isSwift = default(bool?)) - { - VnetResourceId = vnetResourceId; - CertThumbprint = certThumbprint; - CertBlob = certBlob; - Routes = routes; - ResyncRequired = resyncRequired; - DnsServers = dnsServers; - IsSwift = isSwift; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Virtual Network's resource ID. - /// - [JsonProperty(PropertyName = "vnetResourceId")] - public string VnetResourceId { get; set; } - - /// - /// Gets the client certificate thumbprint. - /// - [JsonProperty(PropertyName = "certThumbprint")] - public string CertThumbprint { get; private set; } - - /// - /// Gets or sets a certificate file (.cer) blob containing the public - /// key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// - [JsonProperty(PropertyName = "certBlob")] - public string CertBlob { get; set; } - - /// - /// Gets the routes that this Virtual Network connection uses. - /// - [JsonProperty(PropertyName = "routes")] - public IList Routes { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if a resync is - /// required; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "resyncRequired")] - public bool? ResyncRequired { get; private set; } - - /// - /// Gets or sets DNS servers to be used by this Virtual Network. This - /// should be a comma-separated list of IP addresses. - /// - [JsonProperty(PropertyName = "dnsServers")] - public string DnsServers { get; set; } - - /// - /// Gets or sets flag that is used to denote if this is VNET injection - /// - [JsonProperty(PropertyName = "isSwift")] - public bool? IsSwift { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs deleted file mode 100644 index a5be2d141a93..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetInfoResource.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Virtual Network information ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetInfoResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetInfoResource class. - /// - public VnetInfoResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetInfoResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The Virtual Network's resource - /// ID. - /// The client certificate - /// thumbprint. - /// A certificate file (.cer) blob containing - /// the public key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// The routes that this Virtual Network - /// connection uses. - /// <code>true</code> if a - /// resync is required; otherwise, - /// <code>false</code>. - /// DNS servers to be used by this Virtual - /// Network. This should be a comma-separated list of IP - /// addresses. - /// Flag that is used to denote if this is VNET - /// injection - public VnetInfoResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceId = default(string), string certThumbprint = default(string), string certBlob = default(string), IList routes = default(IList), bool? resyncRequired = default(bool?), string dnsServers = default(string), bool? isSwift = default(bool?)) - : base(id, name, kind, type) - { - VnetResourceId = vnetResourceId; - CertThumbprint = certThumbprint; - CertBlob = certBlob; - Routes = routes; - ResyncRequired = resyncRequired; - DnsServers = dnsServers; - IsSwift = isSwift; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Virtual Network's resource ID. - /// - [JsonProperty(PropertyName = "properties.vnetResourceId")] - public string VnetResourceId { get; set; } - - /// - /// Gets the client certificate thumbprint. - /// - [JsonProperty(PropertyName = "properties.certThumbprint")] - public string CertThumbprint { get; private set; } - - /// - /// Gets or sets a certificate file (.cer) blob containing the public - /// key of the private key used to authenticate a - /// Point-To-Site VPN connection. - /// - [JsonProperty(PropertyName = "properties.certBlob")] - public string CertBlob { get; set; } - - /// - /// Gets the routes that this Virtual Network connection uses. - /// - [JsonProperty(PropertyName = "properties.routes")] - public IList Routes { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if a resync is - /// required; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "properties.resyncRequired")] - public bool? ResyncRequired { get; private set; } - - /// - /// Gets or sets DNS servers to be used by this Virtual Network. This - /// should be a comma-separated list of IP addresses. - /// - [JsonProperty(PropertyName = "properties.dnsServers")] - public string DnsServers { get; set; } - - /// - /// Gets or sets flag that is used to denote if this is VNET injection - /// - [JsonProperty(PropertyName = "properties.isSwift")] - public bool? IsSwift { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs deleted file mode 100644 index bfd2641e12d9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetParameters.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// The required set of inputs to validate a VNET - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetParameters : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetParameters class. - /// - public VnetParameters() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetParameters class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The Resource Group of the VNET to - /// be validated - /// The name of the VNET to be validated - /// The subnet name to be - /// validated - /// The ARM Resource ID of the subnet to - /// validate - public VnetParameters(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string vnetResourceGroup = default(string), string vnetName = default(string), string vnetSubnetName = default(string), string subnetResourceId = default(string)) - : base(id, name, kind, type) - { - VnetResourceGroup = vnetResourceGroup; - VnetName = vnetName; - VnetSubnetName = vnetSubnetName; - SubnetResourceId = subnetResourceId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the Resource Group of the VNET to be validated - /// - [JsonProperty(PropertyName = "properties.vnetResourceGroup")] - public string VnetResourceGroup { get; set; } - - /// - /// Gets or sets the name of the VNET to be validated - /// - [JsonProperty(PropertyName = "properties.vnetName")] - public string VnetName { get; set; } - - /// - /// Gets or sets the subnet name to be validated - /// - [JsonProperty(PropertyName = "properties.vnetSubnetName")] - public string VnetSubnetName { get; set; } - - /// - /// Gets or sets the ARM Resource ID of the subnet to validate - /// - [JsonProperty(PropertyName = "properties.subnetResourceId")] - public string SubnetResourceId { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetRoute.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetRoute.cs deleted file mode 100644 index 5d89d8ccbcf9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetRoute.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// Virtual Network route contract used to pass routing information for a - /// Virtual Network. - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetRoute : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetRoute class. - /// - public VnetRoute() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetRoute class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The starting address for this route. - /// This may also include a CIDR notation, in which case the end - /// address must not be specified. - /// The ending address for this route. If the - /// start address is specified in CIDR notation, this must be - /// omitted. - /// The type of route this is: - /// DEFAULT - By default, every app has routes to the local address - /// ranges specified by RFC1918 - /// INHERITED - Routes inherited from the real Virtual Network routes - /// STATIC - Static route set on the app only - /// - /// These values will be used for syncing an app's routes with those - /// from a Virtual Network. Possible values include: 'DEFAULT', - /// 'INHERITED', 'STATIC' - public VnetRoute(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string startAddress = default(string), string endAddress = default(string), string routeType = default(string)) - : base(id, name, kind, type) - { - StartAddress = startAddress; - EndAddress = endAddress; - RouteType = routeType; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the starting address for this route. This may also - /// include a CIDR notation, in which case the end address must not be - /// specified. - /// - [JsonProperty(PropertyName = "properties.startAddress")] - public string StartAddress { get; set; } - - /// - /// Gets or sets the ending address for this route. If the start - /// address is specified in CIDR notation, this must be omitted. - /// - [JsonProperty(PropertyName = "properties.endAddress")] - public string EndAddress { get; set; } - - /// - /// Gets or sets the type of route this is: - /// DEFAULT - By default, every app has routes to the local address - /// ranges specified by RFC1918 - /// INHERITED - Routes inherited from the real Virtual Network routes - /// STATIC - Static route set on the app only - /// - /// These values will be used for syncing an app's routes with those - /// from a Virtual Network. Possible values include: 'DEFAULT', - /// 'INHERITED', 'STATIC' - /// - [JsonProperty(PropertyName = "properties.routeType")] - public string RouteType { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs deleted file mode 100644 index fc6cb6a7c8e2..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationFailureDetails.cs +++ /dev/null @@ -1,91 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// A class that describes the reason for a validation failure. - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetValidationFailureDetails : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetValidationFailureDetails - /// class. - /// - public VnetValidationFailureDetails() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetValidationFailureDetails - /// class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Text describing the validation - /// outcome. - /// A flag describing whether or not validation - /// failed. - /// A list of tests that failed in the - /// validation. - /// A list of warnings generated during - /// validation. - public VnetValidationFailureDetails(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string message = default(string), bool? failed = default(bool?), IList failedTests = default(IList), IList warnings = default(IList)) - : base(id, name, kind, type) - { - Message = message; - Failed = failed; - FailedTests = failedTests; - Warnings = warnings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets text describing the validation outcome. - /// - [JsonProperty(PropertyName = "properties.message")] - public string Message { get; set; } - - /// - /// Gets or sets a flag describing whether or not validation failed. - /// - [JsonProperty(PropertyName = "properties.failed")] - public bool? Failed { get; set; } - - /// - /// Gets or sets a list of tests that failed in the validation. - /// - [JsonProperty(PropertyName = "properties.failedTests")] - public IList FailedTests { get; set; } - - /// - /// Gets or sets a list of warnings generated during validation. - /// - [JsonProperty(PropertyName = "properties.warnings")] - public IList Warnings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationTestFailure.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationTestFailure.cs deleted file mode 100644 index b0c504e4ebd9..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/VnetValidationTestFailure.cs +++ /dev/null @@ -1,70 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Linq; - - /// - /// A class that describes a test that failed during NSG and UDR - /// validation. - /// - [Rest.Serialization.JsonTransformation] - public partial class VnetValidationTestFailure : ProxyOnlyResource - { - /// - /// Initializes a new instance of the VnetValidationTestFailure class. - /// - public VnetValidationTestFailure() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VnetValidationTestFailure class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// The name of the test that failed. - /// The details of what caused the failure, e.g. - /// the blocking rule name, etc. - public VnetValidationTestFailure(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string testName = default(string), string details = default(string)) - : base(id, name, kind, type) - { - TestName = testName; - Details = details; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the name of the test that failed. - /// - [JsonProperty(PropertyName = "properties.testName")] - public string TestName { get; set; } - - /// - /// Gets or sets the details of what caused the failure, e.g. the - /// blocking rule name, etc. - /// - [JsonProperty(PropertyName = "properties.details")] - public string Details { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs deleted file mode 100644 index 1401f5751420..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMajorVersion.cs +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Web App stack major version. - /// - public partial class WebAppMajorVersion - { - /// - /// Initializes a new instance of the WebAppMajorVersion class. - /// - public WebAppMajorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebAppMajorVersion class. - /// - /// Web App stack major version (display - /// only). - /// Web App stack major version name. - /// Minor versions associated with the - /// major version. - public WebAppMajorVersion(string displayText = default(string), string value = default(string), IList minorVersions = default(IList)) - { - DisplayText = displayText; - Value = value; - MinorVersions = minorVersions; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets web App stack major version (display only). - /// - [JsonProperty(PropertyName = "displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets web App stack major version name. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; private set; } - - /// - /// Gets minor versions associated with the major version. - /// - [JsonProperty(PropertyName = "minorVersions")] - public IList MinorVersions { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs deleted file mode 100644 index 3b7864390773..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppMinorVersion.cs +++ /dev/null @@ -1,69 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Web App stack minor version. - /// - public partial class WebAppMinorVersion - { - /// - /// Initializes a new instance of the WebAppMinorVersion class. - /// - public WebAppMinorVersion() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebAppMinorVersion class. - /// - /// Web App stack minor version (display - /// only). - /// Web App stack major version name. - /// Settings associated with the minor - /// version. - public WebAppMinorVersion(string displayText = default(string), string value = default(string), WebAppRuntimes stackSettings = default(WebAppRuntimes)) - { - DisplayText = displayText; - Value = value; - StackSettings = stackSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets web App stack minor version (display only). - /// - [JsonProperty(PropertyName = "displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets web App stack major version name. - /// - [JsonProperty(PropertyName = "value")] - public string Value { get; private set; } - - /// - /// Gets settings associated with the minor version. - /// - [JsonProperty(PropertyName = "stackSettings")] - public WebAppRuntimes StackSettings { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs deleted file mode 100644 index 9b2842b0248a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimeSettings.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Web App runtime settings. - /// - public partial class WebAppRuntimeSettings - { - /// - /// Initializes a new instance of the WebAppRuntimeSettings class. - /// - public WebAppRuntimeSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebAppRuntimeSettings class. - /// - /// Web App stack minor version (runtime - /// only). - /// <code>true</code> if - /// remote debugging is supported for the stack; otherwise, - /// <code>false</code>. - /// Application Insights settings - /// associated with the minor version. - /// GitHub Actions settings - /// associated with the minor version. - /// <code>true</code> if the stack - /// is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the - /// stack is deprecated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the stack - /// should be hidden; otherwise, - /// <code>false</code>. - /// End-of-life date for the minor - /// version. - /// <code>true</code> if the - /// stack version is auto-updated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the - /// minor version is early-access; otherwise, - /// <code>false</code>. - public WebAppRuntimeSettings(string runtimeVersion = default(string), bool? remoteDebuggingSupported = default(bool?), AppInsightsWebAppStackSettings appInsightsSettings = default(AppInsightsWebAppStackSettings), GitHubActionWebAppStackSettings gitHubActionSettings = default(GitHubActionWebAppStackSettings), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) - { - RuntimeVersion = runtimeVersion; - RemoteDebuggingSupported = remoteDebuggingSupported; - AppInsightsSettings = appInsightsSettings; - GitHubActionSettings = gitHubActionSettings; - IsPreview = isPreview; - IsDeprecated = isDeprecated; - IsHidden = isHidden; - EndOfLifeDate = endOfLifeDate; - IsAutoUpdate = isAutoUpdate; - IsEarlyAccess = isEarlyAccess; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets web App stack minor version (runtime only). - /// - [JsonProperty(PropertyName = "runtimeVersion")] - public string RuntimeVersion { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if remote - /// debugging is supported for the stack; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "remoteDebuggingSupported")] - public bool? RemoteDebuggingSupported { get; private set; } - - /// - /// Gets application Insights settings associated with the minor - /// version. - /// - [JsonProperty(PropertyName = "appInsightsSettings")] - public AppInsightsWebAppStackSettings AppInsightsSettings { get; private set; } - - /// - /// Gets gitHub Actions settings associated with the minor version. - /// - [JsonProperty(PropertyName = "gitHubActionSettings")] - public GitHubActionWebAppStackSettings GitHubActionSettings { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// in preview; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public bool? IsDeprecated { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// should be hidden; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isHidden")] - public bool? IsHidden { get; private set; } - - /// - /// Gets end-of-life date for the minor version. - /// - [JsonProperty(PropertyName = "endOfLifeDate")] - public System.DateTime? EndOfLifeDate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// version is auto-updated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isAutoUpdate")] - public bool? IsAutoUpdate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the minor - /// version is early-access; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isEarlyAccess")] - public bool? IsEarlyAccess { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs deleted file mode 100644 index 06510ee15e8e..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppRuntimes.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Web App stack runtimes. - /// - public partial class WebAppRuntimes - { - /// - /// Initializes a new instance of the WebAppRuntimes class. - /// - public WebAppRuntimes() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebAppRuntimes class. - /// - /// Linux-specific settings - /// associated with the minor version. - /// Windows-specific settings - /// associated with the minor version. - /// Linux-specific settings - /// associated with the Java container minor version. - /// Windows-specific settings - /// associated with the Java container minor version. - public WebAppRuntimes(WebAppRuntimeSettings linuxRuntimeSettings = default(WebAppRuntimeSettings), WebAppRuntimeSettings windowsRuntimeSettings = default(WebAppRuntimeSettings), LinuxJavaContainerSettings linuxContainerSettings = default(LinuxJavaContainerSettings), WindowsJavaContainerSettings windowsContainerSettings = default(WindowsJavaContainerSettings)) - { - LinuxRuntimeSettings = linuxRuntimeSettings; - WindowsRuntimeSettings = windowsRuntimeSettings; - LinuxContainerSettings = linuxContainerSettings; - WindowsContainerSettings = windowsContainerSettings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets linux-specific settings associated with the minor version. - /// - [JsonProperty(PropertyName = "linuxRuntimeSettings")] - public WebAppRuntimeSettings LinuxRuntimeSettings { get; private set; } - - /// - /// Gets windows-specific settings associated with the minor version. - /// - [JsonProperty(PropertyName = "windowsRuntimeSettings")] - public WebAppRuntimeSettings WindowsRuntimeSettings { get; private set; } - - /// - /// Gets linux-specific settings associated with the Java container - /// minor version. - /// - [JsonProperty(PropertyName = "linuxContainerSettings")] - public LinuxJavaContainerSettings LinuxContainerSettings { get; private set; } - - /// - /// Gets windows-specific settings associated with the Java container - /// minor version. - /// - [JsonProperty(PropertyName = "windowsContainerSettings")] - public WindowsJavaContainerSettings WindowsContainerSettings { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs deleted file mode 100644 index 37690ec2fb2d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebAppStack.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Web App stack. - /// - [Rest.Serialization.JsonTransformation] - public partial class WebAppStack : ProxyOnlyResource - { - /// - /// Initializes a new instance of the WebAppStack class. - /// - public WebAppStack() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebAppStack class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Web App stack location. - /// Web App stack (display only). - /// Web App stack name. - /// List of major versions - /// available. - /// Web App stack preferred OS. Possible - /// values include: 'Windows', 'Linux' - public WebAppStack(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string location = default(string), string displayText = default(string), string value = default(string), IList majorVersions = default(IList), StackPreferredOs? preferredOs = default(StackPreferredOs?)) - : base(id, name, kind, type) - { - Location = location; - DisplayText = displayText; - Value = value; - MajorVersions = majorVersions; - PreferredOs = preferredOs; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets web App stack location. - /// - [JsonProperty(PropertyName = "location")] - public string Location { get; private set; } - - /// - /// Gets web App stack (display only). - /// - [JsonProperty(PropertyName = "properties.displayText")] - public string DisplayText { get; private set; } - - /// - /// Gets web App stack name. - /// - [JsonProperty(PropertyName = "properties.value")] - public string Value { get; private set; } - - /// - /// Gets list of major versions available. - /// - [JsonProperty(PropertyName = "properties.majorVersions")] - public IList MajorVersions { get; private set; } - - /// - /// Gets web App stack preferred OS. Possible values include: - /// 'Windows', 'Linux' - /// - [JsonProperty(PropertyName = "properties.preferredOs")] - public StackPreferredOs? PreferredOs { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJob.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJob.cs deleted file mode 100644 index 588aa9240332..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJob.cs +++ /dev/null @@ -1,111 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Web Job Information. - /// - [Rest.Serialization.JsonTransformation] - public partial class WebJob : ProxyOnlyResource - { - /// - /// Initializes a new instance of the WebJob class. - /// - public WebJob() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebJob class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Run command. - /// Job URL. - /// Extra Info URL. - /// Job type. Possible values include: - /// 'Continuous', 'Triggered' - /// Error information. - /// Using SDK? - /// Job settings. - public WebJob(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), string runCommand = default(string), string url = default(string), string extraInfoUrl = default(string), WebJobType? webJobType = default(WebJobType?), string error = default(string), bool? usingSdk = default(bool?), IDictionary settings = default(IDictionary)) - : base(id, name, kind, type) - { - RunCommand = runCommand; - Url = url; - ExtraInfoUrl = extraInfoUrl; - WebJobType = webJobType; - Error = error; - UsingSdk = usingSdk; - Settings = settings; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets run command. - /// - [JsonProperty(PropertyName = "properties.run_command")] - public string RunCommand { get; set; } - - /// - /// Gets or sets job URL. - /// - [JsonProperty(PropertyName = "properties.url")] - public string Url { get; set; } - - /// - /// Gets or sets extra Info URL. - /// - [JsonProperty(PropertyName = "properties.extra_info_url")] - public string ExtraInfoUrl { get; set; } - - /// - /// Gets or sets job type. Possible values include: 'Continuous', - /// 'Triggered' - /// - [JsonProperty(PropertyName = "properties.web_job_type")] - public WebJobType? WebJobType { get; set; } - - /// - /// Gets or sets error information. - /// - [JsonProperty(PropertyName = "properties.error")] - public string Error { get; set; } - - /// - /// Gets or sets using SDK? - /// - [JsonProperty(PropertyName = "properties.using_sdk")] - public bool? UsingSdk { get; set; } - - /// - /// Gets or sets job settings. - /// - [JsonProperty(PropertyName = "properties.settings")] - public IDictionary Settings { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJobType.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJobType.cs deleted file mode 100644 index e8520fd920fe..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebJobType.cs +++ /dev/null @@ -1,60 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for WebJobType. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum WebJobType - { - [EnumMember(Value = "Continuous")] - Continuous, - [EnumMember(Value = "Triggered")] - Triggered - } - internal static class WebJobTypeEnumExtension - { - internal static string ToSerializedValue(this WebJobType? value) - { - return value == null ? null : ((WebJobType)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this WebJobType value) - { - switch( value ) - { - case WebJobType.Continuous: - return "Continuous"; - case WebJobType.Triggered: - return "Triggered"; - } - return null; - } - - internal static WebJobType? ParseWebJobType(this string value) - { - switch( value ) - { - case "Continuous": - return WebJobType.Continuous; - case "Triggered": - return WebJobType.Triggered; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebSiteInstanceStatus.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebSiteInstanceStatus.cs deleted file mode 100644 index c9e91df2ae59..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WebSiteInstanceStatus.cs +++ /dev/null @@ -1,100 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - [Rest.Serialization.JsonTransformation] - public partial class WebSiteInstanceStatus : ProxyOnlyResource - { - /// - /// Initializes a new instance of the WebSiteInstanceStatus class. - /// - public WebSiteInstanceStatus() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WebSiteInstanceStatus class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Possible values include: 'READY', 'STOPPED', - /// 'UNKNOWN' - /// Link to the GetStatusApi in Kudu - /// Link to the Diagnose and Solve - /// Portal - /// Link to the console to web app - /// instance - /// Link to the console to web app - /// instance - public WebSiteInstanceStatus(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), SiteRuntimeState? state = default(SiteRuntimeState?), string statusUrl = default(string), string detectorUrl = default(string), string consoleUrl = default(string), string healthCheckUrl = default(string), IDictionary containers = default(IDictionary)) - : base(id, name, kind, type) - { - State = state; - StatusUrl = statusUrl; - DetectorUrl = detectorUrl; - ConsoleUrl = consoleUrl; - HealthCheckUrl = healthCheckUrl; - Containers = containers; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets possible values include: 'READY', 'STOPPED', 'UNKNOWN' - /// - [JsonProperty(PropertyName = "properties.state")] - public SiteRuntimeState? State { get; set; } - - /// - /// Gets or sets link to the GetStatusApi in Kudu - /// - [JsonProperty(PropertyName = "properties.statusUrl")] - public string StatusUrl { get; set; } - - /// - /// Gets or sets link to the Diagnose and Solve Portal - /// - [JsonProperty(PropertyName = "properties.detectorUrl")] - public string DetectorUrl { get; set; } - - /// - /// Gets or sets link to the console to web app instance - /// - [JsonProperty(PropertyName = "properties.consoleUrl")] - public string ConsoleUrl { get; set; } - - /// - /// Gets or sets link to the console to web app instance - /// - [JsonProperty(PropertyName = "properties.healthCheckUrl")] - public string HealthCheckUrl { get; set; } - - /// - /// - [JsonProperty(PropertyName = "properties.containers")] - public IDictionary Containers { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs deleted file mode 100644 index a773a9d589ab..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WindowsJavaContainerSettings.cs +++ /dev/null @@ -1,130 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Windows Java Container settings. - /// - public partial class WindowsJavaContainerSettings - { - /// - /// Initializes a new instance of the WindowsJavaContainerSettings - /// class. - /// - public WindowsJavaContainerSettings() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WindowsJavaContainerSettings - /// class. - /// - /// Java container (runtime only). - /// Java container version (runtime - /// only). - /// <code>true</code> if the stack - /// is in preview; otherwise, <code>false</code>. - /// <code>true</code> if the - /// stack is deprecated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the stack - /// should be hidden; otherwise, - /// <code>false</code>. - /// End-of-life date for the minor - /// version. - /// <code>true</code> if the - /// stack version is auto-updated; otherwise, - /// <code>false</code>. - /// <code>true</code> if the - /// minor version is early-access; otherwise, - /// <code>false</code>. - public WindowsJavaContainerSettings(string javaContainer = default(string), string javaContainerVersion = default(string), bool? isPreview = default(bool?), bool? isDeprecated = default(bool?), bool? isHidden = default(bool?), System.DateTime? endOfLifeDate = default(System.DateTime?), bool? isAutoUpdate = default(bool?), bool? isEarlyAccess = default(bool?)) - { - JavaContainer = javaContainer; - JavaContainerVersion = javaContainerVersion; - IsPreview = isPreview; - IsDeprecated = isDeprecated; - IsHidden = isHidden; - EndOfLifeDate = endOfLifeDate; - IsAutoUpdate = isAutoUpdate; - IsEarlyAccess = isEarlyAccess; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets java container (runtime only). - /// - [JsonProperty(PropertyName = "javaContainer")] - public string JavaContainer { get; private set; } - - /// - /// Gets java container version (runtime only). - /// - [JsonProperty(PropertyName = "javaContainerVersion")] - public string JavaContainerVersion { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// in preview; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isPreview")] - public bool? IsPreview { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack is - /// deprecated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isDeprecated")] - public bool? IsDeprecated { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// should be hidden; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isHidden")] - public bool? IsHidden { get; private set; } - - /// - /// Gets end-of-life date for the minor version. - /// - [JsonProperty(PropertyName = "endOfLifeDate")] - public System.DateTime? EndOfLifeDate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the stack - /// version is auto-updated; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isAutoUpdate")] - public bool? IsAutoUpdate { get; private set; } - - /// - /// Gets &lt;code&gt;true&lt;/code&gt; if the minor - /// version is early-access; otherwise, - /// &lt;code&gt;false&lt;/code&gt;. - /// - [JsonProperty(PropertyName = "isEarlyAccess")] - public bool? IsEarlyAccess { get; private set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPoolResource.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPoolResource.cs deleted file mode 100644 index 1fc210ba63f6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerPoolResource.cs +++ /dev/null @@ -1,105 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Worker pool of an App Service Environment ARM resource. - /// - [Rest.Serialization.JsonTransformation] - public partial class WorkerPoolResource : ProxyOnlyResource - { - /// - /// Initializes a new instance of the WorkerPoolResource class. - /// - public WorkerPoolResource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the WorkerPoolResource class. - /// - /// Resource Id. - /// Resource Name. - /// Kind of resource. - /// Resource type. - /// Worker size ID for referencing this - /// worker pool. - /// Shared or dedicated app hosting. Possible - /// values include: 'Shared', 'Dedicated', 'Dynamic' - /// VM size of the worker pool - /// instances. - /// Number of instances in the worker - /// pool. - /// Names of all instances in the worker - /// pool (read only). - public WorkerPoolResource(string id = default(string), string name = default(string), string kind = default(string), string type = default(string), int? workerSizeId = default(int?), ComputeModeOptions? computeMode = default(ComputeModeOptions?), string workerSize = default(string), int? workerCount = default(int?), IList instanceNames = default(IList), SkuDescription sku = default(SkuDescription)) - : base(id, name, kind, type) - { - WorkerSizeId = workerSizeId; - ComputeMode = computeMode; - WorkerSize = workerSize; - WorkerCount = workerCount; - InstanceNames = instanceNames; - Sku = sku; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets worker size ID for referencing this worker pool. - /// - [JsonProperty(PropertyName = "properties.workerSizeId")] - public int? WorkerSizeId { get; set; } - - /// - /// Gets or sets shared or dedicated app hosting. Possible values - /// include: 'Shared', 'Dedicated', 'Dynamic' - /// - [JsonProperty(PropertyName = "properties.computeMode")] - public ComputeModeOptions? ComputeMode { get; set; } - - /// - /// Gets or sets VM size of the worker pool instances. - /// - [JsonProperty(PropertyName = "properties.workerSize")] - public string WorkerSize { get; set; } - - /// - /// Gets or sets number of instances in the worker pool. - /// - [JsonProperty(PropertyName = "properties.workerCount")] - public int? WorkerCount { get; set; } - - /// - /// Gets names of all instances in the worker pool (read only). - /// - [JsonProperty(PropertyName = "properties.instanceNames")] - public IList InstanceNames { get; private set; } - - /// - /// - [JsonProperty(PropertyName = "sku")] - public SkuDescription Sku { get; set; } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs deleted file mode 100644 index 0d125a3fdfe8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/Models/WorkerSizeOptions.cs +++ /dev/null @@ -1,120 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites.Models -{ - using Newtonsoft.Json; - using Newtonsoft.Json.Converters; - using System.Runtime; - using System.Runtime.Serialization; - - /// - /// Defines values for WorkerSizeOptions. - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum WorkerSizeOptions - { - [EnumMember(Value = "Small")] - Small, - [EnumMember(Value = "Medium")] - Medium, - [EnumMember(Value = "Large")] - Large, - [EnumMember(Value = "D1")] - D1, - [EnumMember(Value = "D2")] - D2, - [EnumMember(Value = "D3")] - D3, - [EnumMember(Value = "SmallV3")] - SmallV3, - [EnumMember(Value = "MediumV3")] - MediumV3, - [EnumMember(Value = "LargeV3")] - LargeV3, - [EnumMember(Value = "NestedSmall")] - NestedSmall, - [EnumMember(Value = "NestedSmallLinux")] - NestedSmallLinux, - [EnumMember(Value = "Default")] - Default - } - internal static class WorkerSizeOptionsEnumExtension - { - internal static string ToSerializedValue(this WorkerSizeOptions? value) - { - return value == null ? null : ((WorkerSizeOptions)value).ToSerializedValue(); - } - - internal static string ToSerializedValue(this WorkerSizeOptions value) - { - switch( value ) - { - case WorkerSizeOptions.Small: - return "Small"; - case WorkerSizeOptions.Medium: - return "Medium"; - case WorkerSizeOptions.Large: - return "Large"; - case WorkerSizeOptions.D1: - return "D1"; - case WorkerSizeOptions.D2: - return "D2"; - case WorkerSizeOptions.D3: - return "D3"; - case WorkerSizeOptions.SmallV3: - return "SmallV3"; - case WorkerSizeOptions.MediumV3: - return "MediumV3"; - case WorkerSizeOptions.LargeV3: - return "LargeV3"; - case WorkerSizeOptions.NestedSmall: - return "NestedSmall"; - case WorkerSizeOptions.NestedSmallLinux: - return "NestedSmallLinux"; - case WorkerSizeOptions.Default: - return "Default"; - } - return null; - } - - internal static WorkerSizeOptions? ParseWorkerSizeOptions(this string value) - { - switch( value ) - { - case "Small": - return WorkerSizeOptions.Small; - case "Medium": - return WorkerSizeOptions.Medium; - case "Large": - return WorkerSizeOptions.Large; - case "D1": - return WorkerSizeOptions.D1; - case "D2": - return WorkerSizeOptions.D2; - case "D3": - return WorkerSizeOptions.D3; - case "SmallV3": - return WorkerSizeOptions.SmallV3; - case "MediumV3": - return WorkerSizeOptions.MediumV3; - case "LargeV3": - return WorkerSizeOptions.LargeV3; - case "NestedSmall": - return WorkerSizeOptions.NestedSmall; - case "NestedSmallLinux": - return WorkerSizeOptions.NestedSmallLinux; - case "Default": - return WorkerSizeOptions.Default; - } - return null; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs deleted file mode 100644 index cb24dc93b4ce..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperations.cs +++ /dev/null @@ -1,2529 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// ProviderOperations operations. - /// - internal partial class ProviderOperations : IServiceOperations, IProviderOperations - { - /// - /// Initializes a new instance of the ProviderOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ProviderOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', '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>> GetAvailableStacksWithHttpMessagesAsync(string osTypeSelected = default(string), 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("osTypeSelected", osTypeSelected); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAvailableStacks", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/availableStacks").ToString(); - List _queryParameters = new List(); - if (osTypeSelected != null) - { - _queryParameters.Add(string.Format("osTypeSelected={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(osTypeSelected, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetFunctionAppStacksWithHttpMessagesAsync(string stackOsType = default(string), 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("stackOsType", stackOsType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunctionAppStacks", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/functionAppStacks").ToString(); - List _queryParameters = new List(); - if (stackOsType != null) - { - _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// Function App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetFunctionAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - 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("location", location); - tracingParameters.Add("stackOsType", stackOsType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunctionAppStacksForLocation", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/locations/{location}/functionAppStacks").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (stackOsType != null) - { - _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// Web App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetWebAppStacksForLocationWithHttpMessagesAsync(string location, string stackOsType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - 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("location", location); - tracingParameters.Add("stackOsType", stackOsType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebAppStacksForLocation", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/locations/{location}/webAppStacks").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - List _queryParameters = new List(); - if (stackOsType != null) - { - _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListOperationsWithHttpMessagesAsync(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, "ListOperations", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', '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>> GetWebAppStacksWithHttpMessagesAsync(string stackOsType = default(string), 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("stackOsType", stackOsType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebAppStacks", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/webAppStacks").ToString(); - List _queryParameters = new List(); - if (stackOsType != null) - { - _queryParameters.Add(string.Format("stackOsType={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(stackOsType, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', '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>> GetAvailableStacksOnPremWithHttpMessagesAsync(string osTypeSelected = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("osTypeSelected", osTypeSelected); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAvailableStacksOnPrem", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/availableStacks").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (osTypeSelected != null) - { - _queryParameters.Add(string.Format("osTypeSelected={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(osTypeSelected, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// 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>> GetAvailableStacksNextWithHttpMessagesAsync(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, "GetAvailableStacksNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// 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>> GetFunctionAppStacksNextWithHttpMessagesAsync(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, "GetFunctionAppStacksNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// 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>> GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(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, "GetFunctionAppStacksForLocationNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// 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>> GetWebAppStacksForLocationNextWithHttpMessagesAsync(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, "GetWebAppStacksForLocationNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// 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>> ListOperationsNextWithHttpMessagesAsync(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, "ListOperationsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// 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>> GetWebAppStacksNextWithHttpMessagesAsync(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, "GetWebAppStacksNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// 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>> GetAvailableStacksOnPremNextWithHttpMessagesAsync(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, "GetAvailableStacksOnPremNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs deleted file mode 100644 index 0ee4f139be05..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ProviderOperationsExtensions.cs +++ /dev/null @@ -1,611 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ProviderOperations. - /// - public static partial class ProviderOperationsExtensions - { - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', 'All' - /// - public static IPage GetAvailableStacks(this IProviderOperations operations, string osTypeSelected = default(string)) - { - return operations.GetAvailableStacksAsync(osTypeSelected).GetAwaiter().GetResult(); - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetAvailableStacksAsync(this IProviderOperations operations, string osTypeSelected = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAvailableStacksWithHttpMessagesAsync(osTypeSelected, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - public static IPage GetFunctionAppStacks(this IProviderOperations operations, string stackOsType = default(string)) - { - return operations.GetFunctionAppStacksAsync(stackOsType).GetAwaiter().GetResult(); - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetFunctionAppStacksAsync(this IProviderOperations operations, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionAppStacksWithHttpMessagesAsync(stackOsType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// The operations group for this extension method. - /// - /// - /// Function App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - public static IPage GetFunctionAppStacksForLocation(this IProviderOperations operations, string location, string stackOsType = default(string)) - { - return operations.GetFunctionAppStacksForLocationAsync(location, stackOsType).GetAwaiter().GetResult(); - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// The operations group for this extension method. - /// - /// - /// Function App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetFunctionAppStacksForLocationAsync(this IProviderOperations operations, string location, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionAppStacksForLocationWithHttpMessagesAsync(location, stackOsType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// The operations group for this extension method. - /// - /// - /// Web App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - public static IPage GetWebAppStacksForLocation(this IProviderOperations operations, string location, string stackOsType = default(string)) - { - return operations.GetWebAppStacksForLocationAsync(location, stackOsType).GetAwaiter().GetResult(); - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// The operations group for this extension method. - /// - /// - /// Web App stack location. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetWebAppStacksForLocationAsync(this IProviderOperations operations, string location, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebAppStacksForLocationWithHttpMessagesAsync(location, stackOsType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListOperations(this IProviderOperations operations) - { - return operations.ListOperationsAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsAsync(this IProviderOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - public static IPage GetWebAppStacks(this IProviderOperations operations, string stackOsType = default(string)) - { - return operations.GetWebAppStacksAsync(stackOsType).GetAwaiter().GetResult(); - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Stack OS Type. Possible values include: 'Windows', 'Linux', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetWebAppStacksAsync(this IProviderOperations operations, string stackOsType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebAppStacksWithHttpMessagesAsync(stackOsType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', 'All' - /// - public static IPage GetAvailableStacksOnPrem(this IProviderOperations operations, string osTypeSelected = default(string)) - { - return operations.GetAvailableStacksOnPremAsync(osTypeSelected).GetAwaiter().GetResult(); - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// Possible values include: 'Windows', 'Linux', 'WindowsFunctions', - /// 'LinuxFunctions', 'All' - /// - /// - /// The cancellation token. - /// - public static async Task> GetAvailableStacksOnPremAsync(this IProviderOperations operations, string osTypeSelected = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAvailableStacksOnPremWithHttpMessagesAsync(osTypeSelected, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetAvailableStacksNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetAvailableStacksNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAvailableStacksNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAvailableStacksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetFunctionAppStacksNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetFunctionAppStacksNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available Function app frameworks and their versions - /// - /// - /// Description for Get available Function app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetFunctionAppStacksNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionAppStacksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetFunctionAppStacksForLocationNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetFunctionAppStacksForLocationNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available Function app frameworks and their versions for location - /// - /// - /// Description for Get available Function app frameworks and their versions - /// for location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetFunctionAppStacksForLocationNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionAppStacksForLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetWebAppStacksForLocationNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetWebAppStacksForLocationNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available Web app frameworks and their versions for location - /// - /// - /// Description for Get available Web app frameworks and their versions for - /// location - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetWebAppStacksForLocationNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebAppStacksForLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListOperationsNext(this IProviderOperations operations, string nextPageLink) - { - return operations.ListOperationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all available operations for the Microsoft.Web resource provider. Also - /// exposes resource metric definitions - /// - /// - /// Description for Gets all available operations for the Microsoft.Web - /// resource provider. Also exposes resource metric definitions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListOperationsNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListOperationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetWebAppStacksNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetWebAppStacksNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available Web app frameworks and their versions - /// - /// - /// Description for Get available Web app frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetWebAppStacksNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebAppStacksNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetAvailableStacksOnPremNext(this IProviderOperations operations, string nextPageLink) - { - return operations.GetAvailableStacksOnPremNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get available application frameworks and their versions - /// - /// - /// Description for Get available application frameworks and their versions - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAvailableStacksOnPremNextAsync(this IProviderOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAvailableStacksOnPremNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs deleted file mode 100644 index 728f46e9f9c6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperations.cs +++ /dev/null @@ -1,4005 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// RecommendationsOperations operations. - /// - internal partial class RecommendationsOperations : IServiceOperations, IRecommendationsOperations - { - /// - /// Initializes a new instance of the RecommendationsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal RecommendationsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a subscription. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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(bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("featured", featured); - tracingParameters.Add("filter", filter); - 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.Web/recommendations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (featured != null) - { - _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reset all recommendation opt-out settings for a subscription. - /// - /// - /// Description for Reset all recommendation opt-out settings for a - /// subscription. - /// - /// - /// 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 ResetAllFiltersWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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, "ResetAllFilters", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/reset").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; - // 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Disables the specified rule so it will not apply to a subscription in the - /// future. - /// - /// - /// Description for Disables the specified rule so it will not apply to a - /// subscription in the future. - /// - /// - /// Rule name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DisableRecommendationForSubscriptionWithHttpMessagesAsync(string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DisableRecommendationForSubscription", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable").ToString(); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListHistoryForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, bool? expiredOnly = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("expiredOnly", expiredOnly); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHistoryForHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendationHistory").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expiredOnly != null) - { - _queryParameters.Add(string.Format("expiredOnly={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(expiredOnly, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListRecommendedRulesForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("featured", featured); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedRulesForHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (featured != null) - { - _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 DisableAllForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("environmentName", environmentName); - tracingParameters.Add("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DisableAllForHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/disable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (environmentName != null) - { - _queryParameters.Add(string.Format("environmentName={0}", System.Uri.EscapeDataString(environmentName))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 ResetAllFiltersForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("environmentName", environmentName); - tracingParameters.Add("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetAllFiltersForHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/reset").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (environmentName != null) - { - _queryParameters.Add(string.Format("environmentName={0}", System.Uri.EscapeDataString(environmentName))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetRuleDetailsByHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string hostingEnvironmentName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("name", name); - tracingParameters.Add("updateSeen", updateSeen); - tracingParameters.Add("recommendationId", recommendationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRuleDetailsByHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (updateSeen != null) - { - _queryParameters.Add(string.Format("updateSeen={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(updateSeen, Client.SerializationSettings).Trim('"')))); - } - if (recommendationId != null) - { - _queryParameters.Add(string.Format("recommendationId={0}", System.Uri.EscapeDataString(recommendationId))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DisableRecommendationForHostingEnvironmentWithHttpMessagesAsync(string resourceGroupName, string environmentName, string name, string hostingEnvironmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostingEnvironmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostingEnvironmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("environmentName", environmentName); - tracingParameters.Add("name", name); - tracingParameters.Add("hostingEnvironmentName", hostingEnvironmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DisableRecommendationForHostingEnvironment", 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.Web/hostingEnvironments/{hostingEnvironmentName}/recommendations/{name}/disable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostingEnvironmentName}", System.Uri.EscapeDataString(hostingEnvironmentName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (environmentName != null) - { - _queryParameters.Add(string.Format("environmentName={0}", System.Uri.EscapeDataString(environmentName))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListHistoryForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, bool? expiredOnly = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("expiredOnly", expiredOnly); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHistoryForWebApp", 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.Web/sites/{siteName}/recommendationHistory").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expiredOnly != null) - { - _queryParameters.Add(string.Format("expiredOnly={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(expiredOnly, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListRecommendedRulesForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, bool? featured = default(bool?), string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("featured", featured); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRecommendedRulesForWebApp", 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.Web/sites/{siteName}/recommendations").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (featured != null) - { - _queryParameters.Add(string.Format("featured={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(featured, Client.SerializationSettings).Trim('"')))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DisableAllForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DisableAllForWebApp", 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.Web/sites/{siteName}/recommendations/disable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ResetAllFiltersForWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetAllFiltersForWebApp", 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.Web/sites/{siteName}/recommendations/reset").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetRuleDetailsByWebAppWithHttpMessagesAsync(string resourceGroupName, string siteName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("name", name); - tracingParameters.Add("updateSeen", updateSeen); - tracingParameters.Add("recommendationId", recommendationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRuleDetailsByWebApp", 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.Web/sites/{siteName}/recommendations/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (updateSeen != null) - { - _queryParameters.Add(string.Format("updateSeen={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(updateSeen, Client.SerializationSettings).Trim('"')))); - } - if (recommendationId != null) - { - _queryParameters.Add(string.Format("recommendationId={0}", System.Uri.EscapeDataString(recommendationId))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DisableRecommendationForSiteWithHttpMessagesAsync(string resourceGroupName, string siteName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (siteName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteName"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("siteName", siteName); - tracingParameters.Add("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DisableRecommendationForSite", 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.Web/sites/{siteName}/recommendations/{name}/disable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{siteName}", System.Uri.EscapeDataString(siteName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// 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>> ListHistoryForHostingEnvironmentNextWithHttpMessagesAsync(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, "ListHistoryForHostingEnvironmentNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// 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>> ListRecommendedRulesForHostingEnvironmentNextWithHttpMessagesAsync(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, "ListRecommendedRulesForHostingEnvironmentNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// 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>> ListHistoryForWebAppNextWithHttpMessagesAsync(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, "ListHistoryForWebAppNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// 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>> ListRecommendedRulesForWebAppNextWithHttpMessagesAsync(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, "ListRecommendedRulesForWebAppNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperationsExtensions.cs deleted file mode 100644 index aa2e5a89276f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/RecommendationsOperationsExtensions.cs +++ /dev/null @@ -1,1057 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for RecommendationsOperations. - /// - public static partial class RecommendationsOperationsExtensions - { - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - public static IPage List(this IRecommendationsOperations operations, bool? featured = default(bool?), string filter = default(string)) - { - return operations.ListAsync(featured, filter).GetAwaiter().GetResult(); - } - - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IRecommendationsOperations operations, bool? featured = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(featured, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reset all recommendation opt-out settings for a subscription. - /// - /// - /// Description for Reset all recommendation opt-out settings for a - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - public static void ResetAllFilters(this IRecommendationsOperations operations) - { - operations.ResetAllFiltersAsync().GetAwaiter().GetResult(); - } - - /// - /// Reset all recommendation opt-out settings for a subscription. - /// - /// - /// Description for Reset all recommendation opt-out settings for a - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task ResetAllFiltersAsync(this IRecommendationsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetAllFiltersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Disables the specified rule so it will not apply to a subscription in the - /// future. - /// - /// - /// Description for Disables the specified rule so it will not apply to a - /// subscription in the future. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Rule name - /// - public static void DisableRecommendationForSubscription(this IRecommendationsOperations operations, string name) - { - operations.DisableRecommendationForSubscriptionAsync(name).GetAwaiter().GetResult(); - } - - /// - /// Disables the specified rule so it will not apply to a subscription in the - /// future. - /// - /// - /// Description for Disables the specified rule so it will not apply to a - /// subscription in the future. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Rule name - /// - /// - /// The cancellation token. - /// - public static async Task DisableRecommendationForSubscriptionAsync(this IRecommendationsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisableRecommendationForSubscriptionWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - public static IPage ListHistoryForHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, bool? expiredOnly = default(bool?), string filter = default(string)) - { - return operations.ListHistoryForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter).GetAwaiter().GetResult(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// The cancellation token. - /// - public static async Task> ListHistoryForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, bool? expiredOnly = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHistoryForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, hostingEnvironmentName, expiredOnly, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - public static IPage ListRecommendedRulesForHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, bool? featured = default(bool?), string filter = default(string)) - { - return operations.ListRecommendedRulesForHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, featured, filter).GetAwaiter().GetResult(); - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendedRulesForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, bool? featured = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendedRulesForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, hostingEnvironmentName, featured, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static void DisableAllForHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string hostingEnvironmentName) - { - operations.DisableAllForHostingEnvironmentAsync(resourceGroupName, environmentName, hostingEnvironmentName).GetAwaiter().GetResult(); - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DisableAllForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string hostingEnvironmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisableAllForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, environmentName, hostingEnvironmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static void ResetAllFiltersForHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string hostingEnvironmentName) - { - operations.ResetAllFiltersForHostingEnvironmentAsync(resourceGroupName, environmentName, hostingEnvironmentName).GetAwaiter().GetResult(); - } - - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task ResetAllFiltersForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string hostingEnvironmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetAllFiltersForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, environmentName, hostingEnvironmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - public static RecommendationRule GetRuleDetailsByHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string)) - { - return operations.GetRuleDetailsByHostingEnvironmentAsync(resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId).GetAwaiter().GetResult(); - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the hosting environment. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - /// - /// The cancellation token. - /// - public static async Task GetRuleDetailsByHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string hostingEnvironmentName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRuleDetailsByHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, hostingEnvironmentName, name, updateSeen, recommendationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// - public static void DisableRecommendationForHostingEnvironment(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string name, string hostingEnvironmentName) - { - operations.DisableRecommendationForHostingEnvironmentAsync(resourceGroupName, environmentName, name, hostingEnvironmentName).GetAwaiter().GetResult(); - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DisableRecommendationForHostingEnvironmentAsync(this IRecommendationsOperations operations, string resourceGroupName, string environmentName, string name, string hostingEnvironmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisableRecommendationForHostingEnvironmentWithHttpMessagesAsync(resourceGroupName, environmentName, name, hostingEnvironmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - public static IPage ListHistoryForWebApp(this IRecommendationsOperations operations, string resourceGroupName, string siteName, bool? expiredOnly = default(bool?), string filter = default(string)) - { - return operations.ListHistoryForWebAppAsync(resourceGroupName, siteName, expiredOnly, filter).GetAwaiter().GetResult(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>false</code> to return all recommendations. The - /// default is <code>true</code>, which returns only expired - /// recommendations. - /// - /// - /// Filter is specified by using OData syntax. Example: $filter=channel eq - /// 'Api' or channel eq 'Notification' and startTime eq 2014-01-01T00:00:00Z - /// and endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[PT1H|PT1M|P1D] - /// - /// - /// The cancellation token. - /// - public static async Task> ListHistoryForWebAppAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, bool? expiredOnly = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHistoryForWebAppWithHttpMessagesAsync(resourceGroupName, siteName, expiredOnly, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - public static IPage ListRecommendedRulesForWebApp(this IRecommendationsOperations operations, string resourceGroupName, string siteName, bool? featured = default(bool?), string filter = default(string)) - { - return operations.ListRecommendedRulesForWebAppAsync(resourceGroupName, siteName, featured, filter).GetAwaiter().GetResult(); - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify <code>true</code> to return only the most critical - /// recommendations. The default is <code>false</code>, which - /// returns all recommendations. - /// - /// - /// Return only channels specified in the filter. Filter is specified by using - /// OData syntax. Example: $filter=channel eq 'Api' or channel eq - /// 'Notification' - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendedRulesForWebAppAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, bool? featured = default(bool?), string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendedRulesForWebAppWithHttpMessagesAsync(resourceGroupName, siteName, featured, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void DisableAllForWebApp(this IRecommendationsOperations operations, string resourceGroupName, string siteName) - { - operations.DisableAllForWebAppAsync(resourceGroupName, siteName).GetAwaiter().GetResult(); - } - - /// - /// Disable all recommendations for an app. - /// - /// - /// Description for Disable all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task DisableAllForWebAppAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisableAllForWebAppWithHttpMessagesAsync(resourceGroupName, siteName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void ResetAllFiltersForWebApp(this IRecommendationsOperations operations, string resourceGroupName, string siteName) - { - operations.ResetAllFiltersForWebAppAsync(resourceGroupName, siteName).GetAwaiter().GetResult(); - } - - /// - /// Reset all recommendation opt-out settings for an app. - /// - /// - /// Description for Reset all recommendation opt-out settings for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ResetAllFiltersForWebAppAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetAllFiltersForWebAppWithHttpMessagesAsync(resourceGroupName, siteName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - public static RecommendationRule GetRuleDetailsByWebApp(this IRecommendationsOperations operations, string resourceGroupName, string siteName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string)) - { - return operations.GetRuleDetailsByWebAppAsync(resourceGroupName, siteName, name, updateSeen, recommendationId).GetAwaiter().GetResult(); - } - - /// - /// Get a recommendation rule for an app. - /// - /// - /// Description for Get a recommendation rule for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the recommendation. - /// - /// - /// Specify <code>true</code> to update the last-seen timestamp of - /// the recommendation object. - /// - /// - /// The GUID of the recommendation object if you query an expired one. You - /// don't need to specify it to query an active entry. - /// - /// - /// The cancellation token. - /// - public static async Task GetRuleDetailsByWebAppAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, string name, bool? updateSeen = default(bool?), string recommendationId = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRuleDetailsByWebAppWithHttpMessagesAsync(resourceGroupName, siteName, name, updateSeen, recommendationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - public static void DisableRecommendationForSite(this IRecommendationsOperations operations, string resourceGroupName, string siteName, string name) - { - operations.DisableRecommendationForSiteAsync(resourceGroupName, siteName, name).GetAwaiter().GetResult(); - } - - /// - /// Disables the specific rule for a web site permanently. - /// - /// - /// Description for Disables the specific rule for a web site permanently. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name - /// - /// - /// Rule name - /// - /// - /// The cancellation token. - /// - public static async Task DisableRecommendationForSiteAsync(this IRecommendationsOperations operations, string resourceGroupName, string siteName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DisableRecommendationForSiteWithHttpMessagesAsync(resourceGroupName, siteName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IRecommendationsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all recommendations for a subscription. - /// - /// - /// Description for List all recommendations for a 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 IRecommendationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHistoryForHostingEnvironmentNext(this IRecommendationsOperations operations, string nextPageLink) - { - return operations.ListHistoryForHostingEnvironmentNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHistoryForHostingEnvironmentNextAsync(this IRecommendationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHistoryForHostingEnvironmentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListRecommendedRulesForHostingEnvironmentNext(this IRecommendationsOperations operations, string nextPageLink) - { - return operations.ListRecommendedRulesForHostingEnvironmentNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all recommendations for a hosting environment. - /// - /// - /// Description for Get all recommendations for a hosting environment. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendedRulesForHostingEnvironmentNextAsync(this IRecommendationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendedRulesForHostingEnvironmentNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHistoryForWebAppNext(this IRecommendationsOperations operations, string nextPageLink) - { - return operations.ListHistoryForWebAppNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get past recommendations for an app, optionally specified by the time - /// range. - /// - /// - /// Description for Get past recommendations for an app, optionally specified - /// by the time range. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHistoryForWebAppNextAsync(this IRecommendationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHistoryForWebAppNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListRecommendedRulesForWebAppNext(this IRecommendationsOperations operations, string nextPageLink) - { - return operations.ListRecommendedRulesForWebAppNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all recommendations for an app. - /// - /// - /// Description for Get all recommendations for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListRecommendedRulesForWebAppNextAsync(this IRecommendationsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRecommendedRulesForWebAppNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperations.cs deleted file mode 100644 index 02e189302750..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperations.cs +++ /dev/null @@ -1,1986 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// ResourceHealthMetadataOperations operations. - /// - internal partial class ResourceHealthMetadataOperations : IServiceOperations, IResourceHealthMetadataOperations - { - /// - /// Initializes a new instance of the ResourceHealthMetadataOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal ResourceHealthMetadataOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("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.Web/resourceHealthMetadata").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBySiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySite", 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.Web/sites/{name}/resourceHealthMetadata").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBySiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBySite", 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.Web/sites/{name}/resourceHealthMetadata/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBySiteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBySiteSlot", 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.Web/sites/{name}/slots/{slot}/resourceHealthMetadata").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBySiteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBySiteSlot", 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.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the 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>> 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// 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>> ListBySiteNextWithHttpMessagesAsync(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, "ListBySiteNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// 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>> ListBySiteSlotNextWithHttpMessagesAsync(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, "ListBySiteSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperationsExtensions.cs deleted file mode 100644 index a9287925e196..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/ResourceHealthMetadataOperationsExtensions.cs +++ /dev/null @@ -1,491 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for ResourceHealthMetadataOperations. - /// - public static partial class ResourceHealthMetadataOperationsExtensions - { - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IResourceHealthMetadataOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IResourceHealthMetadataOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage ListByResourceGroup(this IResourceHealthMetadataOperations operations, string resourceGroupName) - { - return operations.ListByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IResourceHealthMetadataOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static IPage ListBySite(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name) - { - return operations.ListBySiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySiteAsync(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - public static ResourceHealthMetadata GetBySite(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name) - { - return operations.GetBySiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// The cancellation token. - /// - public static async Task GetBySiteAsync(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBySiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static IPage ListBySiteSlot(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListBySiteSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySiteSlotAsync(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySiteSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static ResourceHealthMetadata GetBySiteSlot(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetBySiteSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetBySiteSlotAsync(this IResourceHealthMetadataOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBySiteSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IResourceHealthMetadataOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all ResourceHealthMetadata for all sites in the subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// 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 IResourceHealthMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IResourceHealthMetadataOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all ResourceHealthMetadata for all sites in the resource group in the - /// subscription. - /// - /// - /// Description for List all ResourceHealthMetadata for all sites in the - /// resource group in the 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> ListByResourceGroupNextAsync(this IResourceHealthMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySiteNext(this IResourceHealthMetadataOperations operations, string nextPageLink) - { - return operations.ListBySiteNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySiteNextAsync(this IResourceHealthMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySiteNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBySiteSlotNext(this IResourceHealthMetadataOperations operations, string nextPageLink) - { - return operations.ListBySiteSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the category of ResourceHealthMetadata to use for the given site as a - /// collection - /// - /// - /// Description for Gets the category of ResourceHealthMetadata to use for the - /// given site as a collection - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBySiteSlotNextAsync(this IResourceHealthMetadataOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBySiteSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs deleted file mode 100644 index 6f43a889b649..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/SdkInfo_WebSiteManagementClient.cs +++ /dev/null @@ -1,74 +0,0 @@ - -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using System; - using System.Collections.Generic; - using System.Linq; - - internal static partial class SdkInfo - { - public static IEnumerable> ApiInfo_WebSiteManagementClient - { - get - { - return new Tuple[] - { - new Tuple("CertificateRegistration", "AppServiceCertificateOrders", "2021-03-01"), - new Tuple("CertificateRegistration", "CertificateOrdersDiagnostics", "2021-03-01"), - new Tuple("CertificateRegistration", "CertificateRegistrationProvider", "2021-03-01"), - new Tuple("DomainRegistration", "DomainRegistrationProvider", "2021-03-01"), - new Tuple("DomainRegistration", "Domains", "2021-03-01"), - new Tuple("DomainRegistration", "TopLevelDomains", "2021-03-01"), - new Tuple("Web", "AppServiceEnvironments", "2021-03-01"), - new Tuple("Web", "AppServicePlans", "2021-03-01"), - new Tuple("Web", "Certificates", "2021-03-01"), - new Tuple("Web", "CheckNameAvailability", "2021-03-01"), - new Tuple("Web", "ContainerApps", "2021-03-01"), - new Tuple("Web", "ContainerAppsRevisions", "2021-03-01"), - new Tuple("Web", "DeletedWebApps", "2021-03-01"), - new Tuple("Web", "Diagnostics", "2021-03-01"), - new Tuple("Web", "GetPublishingUser", "2021-03-01"), - new Tuple("Web", "GetSourceControl", "2021-03-01"), - new Tuple("Web", "GetSubscriptionDeploymentLocations", "2021-03-01"), - new Tuple("Web", "Global", "2021-03-01"), - new Tuple("Web", "KubeEnvironments", "2021-03-01"), - new Tuple("Web", "ListBillingMeters", "2021-03-01"), - new Tuple("Web", "ListCustomHostNameSites", "2021-03-01"), - new Tuple("Web", "ListGeoRegions", "2021-03-01"), - new Tuple("Web", "ListPremierAddOnOffers", "2021-03-01"), - new Tuple("Web", "ListSiteIdentifiersAssignedToHostName", "2021-03-01"), - new Tuple("Web", "ListSkus", "2021-03-01"), - new Tuple("Web", "ListSourceControls", "2021-03-01"), - new Tuple("Web", "Provider", "2021-03-01"), - new Tuple("Web", "Recommendations", "2021-03-01"), - new Tuple("Web", "ResourceHealthMetadata", "2021-03-01"), - new Tuple("Web", "StaticSites", "2021-03-01"), - new Tuple("Web", "UpdatePublishingUser", "2021-03-01"), - new Tuple("Web", "UpdateSourceControl", "2021-03-01"), - new Tuple("Web", "Validate", "2021-03-01"), - new Tuple("Web", "VerifyHostingEnvironmentVnet", "2021-03-01"), - new Tuple("Web", "WebApps", "2021-03-01"), - new Tuple("WebSiteManagementClient", "Move", "2021-03-01"), - new Tuple("WebSiteManagementClient", "ValidateMove", "2021-03-01"), - }.AsEnumerable(); - } - } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "2.0.4421"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/main/specification/web/resource-manager/readme.md --csharp --version=2.0.4421 --reflect-api-versions --csharp-sdks-folder=D:\\DotNet-SDK\\Apr-2022\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "main"; - public static readonly String GithubCommidId = "d48ca7ed92cbb4f972eb6214bdb3200edaf78369"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs deleted file mode 100644 index 197075937acc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperations.cs +++ /dev/null @@ -1,12615 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// StaticSitesOperations operations. - /// - internal partial class StaticSitesOperations : IServiceOperations, IStaticSitesOperations - { - /// - /// Initializes a new instance of the StaticSitesOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal StaticSitesOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Generates a preview workflow file for the static site - /// - /// - /// Description for Generates a preview workflow file for the static site - /// - /// - /// Location where you plan to create the static site. - /// - /// - /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. - /// See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> PreviewWorkflowWithHttpMessagesAsync(string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (location == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "location"); - } - if (staticSitesWorkflowPreviewRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSitesWorkflowPreviewRequest"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("location", location); - tracingParameters.Add("staticSitesWorkflowPreviewRequest", staticSitesWorkflowPreviewRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PreviewWorkflow", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/locations/{location}/previewStaticSiteWorkflowFile").ToString(); - _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); - _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(staticSitesWorkflowPreviewRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSitesWorkflowPreviewRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/staticSites").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetStaticSitesByResourceGroupWithHttpMessagesAsync(string resourceGroupName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSitesByResourceGroup", 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.Web/staticSites").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a static site. - /// - /// - /// Description for Gets the details of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSite", 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.Web/staticSites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteStaticSiteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (staticSiteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("staticSiteEnvelope", staticSiteEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSite", 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.Web/staticSites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(staticSiteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for the users. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListStaticSiteUsersWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (authprovider == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("authprovider", authprovider); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteUsers", 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.Web/staticSites/{name}/authproviders/{authprovider}/listUsers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes the user entry from the static site. - /// - /// - /// Description for Deletes the user entry from the static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the staticsite. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// 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 DeleteStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (authprovider == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); - } - if (userid == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "userid"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("authprovider", authprovider); - tracingParameters.Add("userid", userid); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteStaticSiteUser", 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.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); - _url = _url.Replace("{userid}", System.Uri.EscapeDataString(userid)); - _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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates a user entry with the listed roles - /// - /// - /// Description for Updates a user entry with the listed roles - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// A JSON representation of the StaticSiteUser properties. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateStaticSiteUserWithHttpMessagesAsync(string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (authprovider == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "authprovider"); - } - if (userid == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "userid"); - } - if (staticSiteUserEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("authprovider", authprovider); - tracingParameters.Add("userid", userid); - tracingParameters.Add("staticSiteUserEnvelope", staticSiteUserEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateStaticSiteUser", 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.Web/staticSites/{name}/authproviders/{authprovider}/users/{userid}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{authprovider}", System.Uri.EscapeDataString(authprovider)); - _url = _url.Replace("{userid}", System.Uri.EscapeDataString(userid)); - _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(staticSiteUserEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetStaticSiteBuildsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuilds", 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.Web/staticSites/{name}/builds").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a static site build. - /// - /// - /// Description for Gets the details of a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> GetStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates or updates the app settings of a static site build. - /// - /// - /// Description for Creates or updates the app settings of a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site app settings to 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> CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteBuildAppSettings", 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.Web/staticSites/{name}/builds/{environmentName}/config/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates the function app settings of a static site build. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site function app settings to 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> CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteBuildFunctionAppSettings", 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.Web/staticSites/{name}/builds/{environmentName}/config/functionappsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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>> ListStaticSiteBuildFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctions", 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.Web/staticSites/{name}/builds/{environmentName}/functions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildAppSettings", 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.Web/staticSites/{name}/builds/{environmentName}/listAppSettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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> ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteBuildFunctionAppSettings", 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.Web/staticSites/{name}/builds/{environmentName}/listFunctionAppSettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site 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>> GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppsForStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 provided function app registered with a static - /// site build - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppForStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Detach the user provided function app from the static site build - /// - /// - /// Description for Detach the user provided function app from the static site - /// build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// 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 DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DetachUserProvidedFunctionAppFromStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates or updates the app settings of a static site. - /// - /// - /// Description for Creates or updates the app settings of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site app settings to 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> CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteAppSettings", 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.Web/staticSites/{name}/config/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates or updates the function app settings of a static site. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site function app settings to 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> CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateStaticSiteFunctionAppSettings", 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.Web/staticSites/{name}/config/functionappsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates an invitation link for a user with the role - /// - /// - /// Description for Creates an invitation link for a user with the role - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateUserRolesInvitationLinkWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (staticSiteUserRolesInvitationEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserRolesInvitationEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("staticSiteUserRolesInvitationEnvelope", staticSiteUserRolesInvitationEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateUserRolesInvitationLink", 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.Web/staticSites/{name}/createUserInvitation").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(staticSiteUserRolesInvitationEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserRolesInvitationEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListStaticSiteCustomDomainsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteCustomDomains", 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.Web/staticSites/{name}/customDomains").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 an existing custom domain for a particular static site. - /// - /// - /// Description for Gets an existing custom domain for a particular static - /// site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// The custom domain name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainName", domainName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetStaticSiteCustomDomain", 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.Web/staticSites/{name}/customDomains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListStaticSiteFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctions", 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.Web/staticSites/{name}/functions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListStaticSiteAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteAppSettings", 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.Web/staticSites/{name}/listAppSettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 roles configured for the static site. - /// - /// - /// Description for Lists the roles configured for the static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListStaticSiteConfiguredRolesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteConfiguredRoles", 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.Web/staticSites/{name}/listConfiguredRoles").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteFunctionAppSettings", 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.Web/staticSites/{name}/listFunctionAppSettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 secrets for an existing static site. - /// - /// - /// Description for Lists the secrets for an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListStaticSiteSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListStaticSiteSecrets", 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.Web/staticSites/{name}/listSecrets").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionList", 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.Web/staticSites/{name}/privateEndpointConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResources", 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.Web/staticSites/{name}/privateLinkResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Resets the api key for an existing static site. - /// - /// - /// Description for Resets the api key for an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// 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 ResetStaticSiteApiKeyWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (resetPropertiesEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resetPropertiesEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("resetPropertiesEnvelope", resetPropertiesEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetStaticSiteApiKey", 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.Web/staticSites/{name}/resetapikey").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(resetPropertiesEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(resetPropertiesEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppsForStaticSite", 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.Web/staticSites/{name}/userProvidedFunctionApps").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 provided function app registered with a static - /// site - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetUserProvidedFunctionAppForStaticSite", 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.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Detach the user provided function app from the static site - /// - /// - /// Description for Detach the user provided function app from the static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// 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 DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DetachUserProvidedFunctionAppFromStaticSite", 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.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (staticSiteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteEnvelope"); - } - if (staticSiteEnvelope != null) - { - staticSiteEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("staticSiteEnvelope", staticSiteEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateStaticSite", 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.Web/staticSites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(staticSiteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// 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 BeginDeleteStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteStaticSite", 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.Web/staticSites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// 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 BeginDeleteStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (staticSiteUserProvidedFunctionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserProvidedFunctionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("staticSiteUserProvidedFunctionEnvelope", staticSiteUserProvidedFunctionEnvelope); - tracingParameters.Add("isForced", isForced); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (isForced != null) - { - _queryParameters.Add(string.Format("isForced={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isForced, 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("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(staticSiteUserProvidedFunctionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserProvidedFunctionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// 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 BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (environmentName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "environmentName"); - } - if (staticSiteZipDeploymentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteZipDeploymentEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("environmentName", environmentName); - tracingParameters.Add("staticSiteZipDeploymentEnvelope", staticSiteZipDeploymentEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateZipDeploymentForStaticSiteBuild", 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.Web/staticSites/{name}/builds/{environmentName}/zipdeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{environmentName}", System.Uri.EscapeDataString(environmentName)); - _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(staticSiteZipDeploymentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteZipDeploymentEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (staticSiteCustomDomainRequestPropertiesEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteCustomDomainRequestPropertiesEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainName", domainName); - tracingParameters.Add("staticSiteCustomDomainRequestPropertiesEnvelope", staticSiteCustomDomainRequestPropertiesEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateStaticSiteCustomDomain", 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.Web/staticSites/{name}/customDomains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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(staticSiteCustomDomainRequestPropertiesEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteCustomDomainRequestPropertiesEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// 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 BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainName", domainName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeleteStaticSiteCustomDomain", 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.Web/staticSites/{name}/customDomains/{domainName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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 != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// 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 BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainName"); - } - if (staticSiteCustomDomainRequestPropertiesEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteCustomDomainRequestPropertiesEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainName", domainName); - tracingParameters.Add("staticSiteCustomDomainRequestPropertiesEnvelope", staticSiteCustomDomainRequestPropertiesEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginValidateCustomDomainCanBeAddedToStaticSite", 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.Web/staticSites/{name}/customDomains/{domainName}/validate").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainName}", System.Uri.EscapeDataString(domainName)); - _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(staticSiteCustomDomainRequestPropertiesEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteCustomDomainRequestPropertiesEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// 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 BeginDetachStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDetachStaticSite", 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.Web/staticSites/{name}/detach").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", 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.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", 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.Web/staticSites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _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; - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionAppName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionAppName"); - } - if (staticSiteUserProvidedFunctionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteUserProvidedFunctionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionAppName", functionAppName); - tracingParameters.Add("staticSiteUserProvidedFunctionEnvelope", staticSiteUserProvidedFunctionEnvelope); - tracingParameters.Add("isForced", isForced); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRegisterUserProvidedFunctionAppWithStaticSite", 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.Web/staticSites/{name}/userProvidedFunctionApps/{functionAppName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionAppName}", System.Uri.EscapeDataString(functionAppName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (isForced != null) - { - _queryParameters.Add(string.Format("isForced={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(isForced, 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("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(staticSiteUserProvidedFunctionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteUserProvidedFunctionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// 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 BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (staticSiteZipDeploymentEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "staticSiteZipDeploymentEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("staticSiteZipDeploymentEnvelope", staticSiteZipDeploymentEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateZipDeploymentForStaticSite", 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.Web/staticSites/{name}/zipdeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(staticSiteZipDeploymentEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(staticSiteZipDeploymentEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(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, "GetStaticSitesByResourceGroupNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// 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>> ListStaticSiteUsersNextWithHttpMessagesAsync(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, "ListStaticSiteUsersNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// 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>> GetStaticSiteBuildsNextWithHttpMessagesAsync(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, "GetStaticSiteBuildsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// 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>> ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(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, "ListStaticSiteBuildFunctionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// 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>> GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(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, "GetUserProvidedFunctionAppsForStaticSiteBuildNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// 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>> ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(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, "ListStaticSiteCustomDomainsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// 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>> ListStaticSiteFunctionsNextWithHttpMessagesAsync(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, "ListStaticSiteFunctionsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionListNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// 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>> GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(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, "GetUserProvidedFunctionAppsForStaticSiteNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs deleted file mode 100644 index 78c4805f4470..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/StaticSitesOperationsExtensions.cs +++ /dev/null @@ -1,3685 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for StaticSitesOperations. - /// - public static partial class StaticSitesOperationsExtensions - { - /// - /// Generates a preview workflow file for the static site - /// - /// - /// Description for Generates a preview workflow file for the static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location where you plan to create the static site. - /// - /// - /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. - /// See example. - /// - public static StaticSitesWorkflowPreview PreviewWorkflow(this IStaticSitesOperations operations, string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest) - { - return operations.PreviewWorkflowAsync(location, staticSitesWorkflowPreviewRequest).GetAwaiter().GetResult(); - } - - /// - /// Generates a preview workflow file for the static site - /// - /// - /// Description for Generates a preview workflow file for the static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Location where you plan to create the static site. - /// - /// - /// A JSON representation of the StaticSitesWorkflowPreviewRequest properties. - /// See example. - /// - /// - /// The cancellation token. - /// - public static async Task PreviewWorkflowAsync(this IStaticSitesOperations operations, string location, StaticSitesWorkflowPreviewRequest staticSitesWorkflowPreviewRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PreviewWorkflowWithHttpMessagesAsync(location, staticSitesWorkflowPreviewRequest, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IStaticSitesOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IStaticSitesOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - public static IPage GetStaticSitesByResourceGroup(this IStaticSitesOperations operations, string resourceGroupName) - { - return operations.GetStaticSitesByResourceGroupAsync(resourceGroupName).GetAwaiter().GetResult(); - } - - /// - /// Gets all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The cancellation token. - /// - public static async Task> GetStaticSitesByResourceGroupAsync(this IStaticSitesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSitesByResourceGroupWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a static site. - /// - /// - /// Description for Gets the details of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static StaticSiteARMResource GetStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.GetStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a static site. - /// - /// - /// Description for Gets the details of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task GetStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - public static StaticSiteARMResource CreateOrUpdateStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope) - { - return operations.CreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - public static void DeleteStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - operations.DeleteStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - public static StaticSiteARMResource UpdateStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope) - { - return operations.UpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSitePatchResource staticSiteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for the users. - /// - public static IPage ListStaticSiteUsers(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider) - { - return operations.ListStaticSiteUsersAsync(resourceGroupName, name, authprovider).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for the users. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteUsersAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteUsersWithHttpMessagesAsync(resourceGroupName, name, authprovider, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the user entry from the static site. - /// - /// - /// Description for Deletes the user entry from the static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the staticsite. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - public static void DeleteStaticSiteUser(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider, string userid) - { - operations.DeleteStaticSiteUserAsync(resourceGroupName, name, authprovider, userid).GetAwaiter().GetResult(); - } - - /// - /// Deletes the user entry from the static site. - /// - /// - /// Description for Deletes the user entry from the static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the staticsite. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteStaticSiteUserAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider, string userid, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteStaticSiteUserWithHttpMessagesAsync(resourceGroupName, name, authprovider, userid, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates a user entry with the listed roles - /// - /// - /// Description for Updates a user entry with the listed roles - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// A JSON representation of the StaticSiteUser properties. See example. - /// - public static StaticSiteUserARMResource UpdateStaticSiteUser(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope) - { - return operations.UpdateStaticSiteUserAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Updates a user entry with the listed roles - /// - /// - /// Description for Updates a user entry with the listed roles - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The auth provider for this user. - /// - /// - /// The user id of the user. - /// - /// - /// A JSON representation of the StaticSiteUser properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateStaticSiteUserAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string authprovider, string userid, StaticSiteUserARMResource staticSiteUserEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateStaticSiteUserWithHttpMessagesAsync(resourceGroupName, name, authprovider, userid, staticSiteUserEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static IPage GetStaticSiteBuilds(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.GetStaticSiteBuildsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task> GetStaticSiteBuildsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSiteBuildsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a static site build. - /// - /// - /// Description for Gets the details of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static StaticSiteBuildARMResource GetStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - return operations.GetStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a static site build. - /// - /// - /// Description for Gets the details of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task GetStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static void DeleteStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - operations.DeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates the app settings of a static site build. - /// - /// - /// Description for Creates or updates the app settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site app settings to update. - /// - public static StringDictionary CreateOrUpdateStaticSiteBuildAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings) - { - return operations.CreateOrUpdateStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName, appSettings).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the app settings of a static site build. - /// - /// - /// Description for Creates or updates the app settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site app settings to update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteBuildAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteBuildAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, appSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates the function app settings of a static site build. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site function app settings to update. - /// - public static StringDictionary CreateOrUpdateStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings) - { - return operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, environmentName, appSettings).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the function app settings of a static site build. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The dictionary containing the static site function app settings to update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, appSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static IPage ListStaticSiteBuildFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - return operations.ListStaticSiteBuildFunctionsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteBuildFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteBuildFunctionsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static StringDictionary ListStaticSiteBuildAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - return operations.ListStaticSiteBuildAppSettingsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteBuildAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteBuildAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static StringDictionary ListStaticSiteBuildFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - return operations.ListStaticSiteBuildFunctionAppSettingsAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of a static site build. - /// - /// - /// Description for Gets the application settings of a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteBuildFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteBuildFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static IPage GetUserProvidedFunctionAppsForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - return operations.GetUserProvidedFunctionAppsForStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task> GetUserProvidedFunctionAppsForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of the user provided function app registered with a static - /// site build - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - public static StaticSiteUserProvidedFunctionAppARMResource GetUserProvidedFunctionAppForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName) - { - return operations.GetUserProvidedFunctionAppForStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function app registered with a static - /// site build - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// The cancellation token. - /// - public static async Task GetUserProvidedFunctionAppForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - public static StaticSiteUserProvidedFunctionAppARMResource RegisterUserProvidedFunctionAppWithStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) - { - return operations.RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task RegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Detach the user provided function app from the static site build - /// - /// - /// Description for Detach the user provided function app from the static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - public static void DetachUserProvidedFunctionAppFromStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName) - { - operations.DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName).GetAwaiter().GetResult(); - } - - /// - /// Detach the user provided function app from the static site build - /// - /// - /// Description for Detach the user provided function app from the static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app registered with the static site build. - /// - /// - /// The cancellation token. - /// - public static async Task DetachUserProvidedFunctionAppFromStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DetachUserProvidedFunctionAppFromStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - public static void CreateZipDeploymentForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) - { - operations.CreateZipDeploymentForStaticSiteBuildAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateZipDeploymentForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates or updates the app settings of a static site. - /// - /// - /// Description for Creates or updates the app settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site app settings to update. - /// - public static StringDictionary CreateOrUpdateStaticSiteAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings) - { - return operations.CreateOrUpdateStaticSiteAppSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the app settings of a static site. - /// - /// - /// Description for Creates or updates the app settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site app settings to update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteAppSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates or updates the function app settings of a static site. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site function app settings to update. - /// - public static StringDictionary CreateOrUpdateStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings) - { - return operations.CreateOrUpdateStaticSiteFunctionAppSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); - } - - /// - /// Creates or updates the function app settings of a static site. - /// - /// - /// Description for Creates or updates the function app settings of a static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The dictionary containing the static site function app settings to update. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates an invitation link for a user with the role - /// - /// - /// Description for Creates an invitation link for a user with the role - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - public static StaticSiteUserInvitationResponseResource CreateUserRolesInvitationLink(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope) - { - return operations.CreateUserRolesInvitationLinkAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates an invitation link for a user with the role - /// - /// - /// Description for Creates an invitation link for a user with the role - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task CreateUserRolesInvitationLinkAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteUserInvitationRequestResource staticSiteUserRolesInvitationEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateUserRolesInvitationLinkWithHttpMessagesAsync(resourceGroupName, name, staticSiteUserRolesInvitationEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - public static IPage ListStaticSiteCustomDomains(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteCustomDomainsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteCustomDomainsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteCustomDomainsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an existing custom domain for a particular static site. - /// - /// - /// Description for Gets an existing custom domain for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// The custom domain name. - /// - public static StaticSiteCustomDomainOverviewARMResource GetStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) - { - return operations.GetStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); - } - - /// - /// Gets an existing custom domain for a particular static site. - /// - /// - /// Description for Gets an existing custom domain for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site resource to search in. - /// - /// - /// The custom domain name. - /// - /// - /// The cancellation token. - /// - public static async Task GetStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - public static StaticSiteCustomDomainOverviewARMResource CreateOrUpdateStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) - { - return operations.CreateOrUpdateStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - public static void DeleteStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) - { - operations.DeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - public static void ValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) - { - operations.ValidateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateCustomDomainCanBeAddedToStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - public static void DetachStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - operations.DetachStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// The cancellation token. - /// - public static async Task DetachStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static IPage ListStaticSiteFunctions(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteFunctionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteFunctionsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteFunctionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static StringDictionary ListStaticSiteAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteAppSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteAppSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists the roles configured for the static site. - /// - /// - /// Description for Lists the roles configured for the static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static StringList ListStaticSiteConfiguredRoles(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteConfiguredRolesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Lists the roles configured for the static site. - /// - /// - /// Description for Lists the roles configured for the static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteConfiguredRolesAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteConfiguredRolesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static StringDictionary ListStaticSiteFunctionAppSettings(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteFunctionAppSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of a static site. - /// - /// - /// Description for Gets the application settings of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteFunctionAppSettingsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteFunctionAppSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists the secrets for an existing static site. - /// - /// - /// Description for Lists the secrets for an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static StringDictionary ListStaticSiteSecrets(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.ListStaticSiteSecretsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Lists the secrets for an existing static site. - /// - /// - /// Description for Lists the secrets for an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task ListStaticSiteSecretsAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteSecretsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static IPage GetPrivateEndpointConnectionList(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// The cancellation token. - /// - public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - public static object DeletePrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task DeletePrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateLinkResourcesAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Resets the api key for an existing static site. - /// - /// - /// Description for Resets the api key for an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - public static void ResetStaticSiteApiKey(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope) - { - operations.ResetStaticSiteApiKeyAsync(resourceGroupName, name, resetPropertiesEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Resets the api key for an existing static site. - /// - /// - /// Description for Resets the api key for an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task ResetStaticSiteApiKeyAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteResetPropertiesARMResource resetPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetStaticSiteApiKeyWithHttpMessagesAsync(resourceGroupName, name, resetPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - public static IPage GetUserProvidedFunctionAppsForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - return operations.GetUserProvidedFunctionAppsForStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The cancellation token. - /// - public static async Task> GetUserProvidedFunctionAppsForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of the user provided function app registered with a static - /// site - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - public static StaticSiteUserProvidedFunctionAppARMResource GetUserProvidedFunctionAppForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName) - { - return operations.GetUserProvidedFunctionAppForStaticSiteAsync(resourceGroupName, name, functionAppName).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function app registered with a static - /// site - /// - /// - /// Description for Gets the details of the user provided function app - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// The cancellation token. - /// - public static async Task GetUserProvidedFunctionAppForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - public static StaticSiteUserProvidedFunctionAppARMResource RegisterUserProvidedFunctionAppWithStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) - { - return operations.RegisterUserProvidedFunctionAppWithStaticSiteAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task RegisterUserProvidedFunctionAppWithStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.RegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Detach the user provided function app from the static site - /// - /// - /// Description for Detach the user provided function app from the static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - public static void DetachUserProvidedFunctionAppFromStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName) - { - operations.DetachUserProvidedFunctionAppFromStaticSiteAsync(resourceGroupName, name, functionAppName).GetAwaiter().GetResult(); - } - - /// - /// Detach the user provided function app from the static site - /// - /// - /// Description for Detach the user provided function app from the static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app registered with the static site. - /// - /// - /// The cancellation token. - /// - public static async Task DetachUserProvidedFunctionAppFromStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DetachUserProvidedFunctionAppFromStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - public static void CreateZipDeploymentForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) - { - operations.CreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateZipDeploymentForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.CreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - public static StaticSiteARMResource BeginCreateOrUpdateStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope) - { - return operations.BeginCreateOrUpdateStaticSiteAsync(resourceGroupName, name, staticSiteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new static site in an existing resource group, or updates an - /// existing static site. - /// - /// - /// Description for Creates a new static site in an existing resource group, or - /// updates an existing static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to create or update. - /// - /// - /// A JSON representation of the staticsite properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteARMResource staticSiteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - public static void BeginDeleteStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - operations.BeginDeleteStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Deletes a static site. - /// - /// - /// Description for Deletes a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to delete. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - public static void BeginDeleteStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName) - { - operations.BeginDeleteStaticSiteBuildAsync(resourceGroupName, name, environmentName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a static site build. - /// - /// - /// Description for Deletes a static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - public static StaticSiteUserProvidedFunctionAppARMResource BeginRegisterUserProvidedFunctionAppWithStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) - { - return operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); - } - - /// - /// Register a user provided function app with a static site build - /// - /// - /// Description for Register a user provided function app with a static site - /// build - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The stage site identifier. - /// - /// - /// Name of the function app to register with the static site build. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - public static void BeginCreateZipDeploymentForStaticSiteBuild(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) - { - operations.BeginCreateZipDeploymentForStaticSiteBuildAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Deploys zipped content to a specific environment of a static site. - /// - /// - /// Description for Deploys zipped content to a specific environment of a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the environment. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateZipDeploymentForStaticSiteBuildAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string environmentName, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginCreateZipDeploymentForStaticSiteBuildWithHttpMessagesAsync(resourceGroupName, name, environmentName, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - public static StaticSiteCustomDomainOverviewARMResource BeginCreateOrUpdateStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) - { - return operations.BeginCreateOrUpdateStaticSiteCustomDomainAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new static site custom domain in an existing resource group and - /// static site. - /// - /// - /// Description for Creates a new static site custom domain in an existing - /// resource group and static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to create. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - public static void BeginDeleteStaticSiteCustomDomain(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName) - { - operations.BeginDeleteStaticSiteCustomDomainAsync(resourceGroupName, name, domainName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a custom domain. - /// - /// - /// Description for Deletes a custom domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to delete. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteStaticSiteCustomDomainAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteStaticSiteCustomDomainWithHttpMessagesAsync(resourceGroupName, name, domainName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - public static void BeginValidateCustomDomainCanBeAddedToStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope) - { - operations.BeginValidateCustomDomainCanBeAddedToStaticSiteAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Validates a particular custom domain can be added to a static site. - /// - /// - /// Description for Validates a particular custom domain can be added to a - /// static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// The custom domain to validate. - /// - /// - /// A JSON representation of the static site custom domain request properties. - /// See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginValidateCustomDomainCanBeAddedToStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string domainName, StaticSiteCustomDomainRequestPropertiesARMResource staticSiteCustomDomainRequestPropertiesEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginValidateCustomDomainCanBeAddedToStaticSiteWithHttpMessagesAsync(resourceGroupName, name, domainName, staticSiteCustomDomainRequestPropertiesEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - public static void BeginDetachStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name) - { - operations.BeginDetachStaticSiteAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Detaches a static site. - /// - /// - /// Description for Detaches a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site to detach. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDetachStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDetachStaticSiteWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Request body. - /// - /// - /// The cancellation token. - /// - public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - public static object BeginDeletePrivateEndpointConnection(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeletePrivateEndpointConnectionAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - public static StaticSiteUserProvidedFunctionAppARMResource BeginRegisterUserProvidedFunctionAppWithStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?)) - { - return operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced).GetAwaiter().GetResult(); - } - - /// - /// Register a user provided function app with a static site - /// - /// - /// Description for Register a user provided function app with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// Name of the function app to register with the static site. - /// - /// - /// A JSON representation of the user provided function app properties. See - /// example. - /// - /// - /// Specify <code>true</code> to force the update of the auth - /// configuration on the function app even if an AzureStaticWebApps provider is - /// already configured on the function app. The default is - /// <code>false</code>. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRegisterUserProvidedFunctionAppWithStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, string functionAppName, StaticSiteUserProvidedFunctionAppARMResource staticSiteUserProvidedFunctionEnvelope, bool? isForced = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginRegisterUserProvidedFunctionAppWithStaticSiteWithHttpMessagesAsync(resourceGroupName, name, functionAppName, staticSiteUserProvidedFunctionEnvelope, isForced, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - public static void BeginCreateZipDeploymentForStaticSite(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope) - { - operations.BeginCreateZipDeploymentForStaticSiteAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Deploys zipped content to a static site. - /// - /// - /// Description for Deploys zipped content to a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the static site. - /// - /// - /// A JSON representation of the StaticSiteZipDeployment properties. See - /// example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateZipDeploymentForStaticSiteAsync(this IStaticSitesOperations operations, string resourceGroupName, string name, StaticSiteZipDeploymentARMResource staticSiteZipDeploymentEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginCreateZipDeploymentForStaticSiteWithHttpMessagesAsync(resourceGroupName, name, staticSiteZipDeploymentEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all Static Sites for a subscription. - /// - /// - /// Description for Get all Static Sites for a 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 IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetStaticSitesByResourceGroupNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.GetStaticSitesByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all static sites in the specified resource group. - /// - /// - /// Description for Gets all static sites in the specified resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetStaticSitesByResourceGroupNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSitesByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListStaticSiteUsersNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.ListStaticSiteUsersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of users of a static site. - /// - /// - /// Description for Gets the list of users of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteUsersNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteUsersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetStaticSiteBuildsNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.GetStaticSiteBuildsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all static site builds for a particular static site. - /// - /// - /// Description for Gets all static site builds for a particular static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetStaticSiteBuildsNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetStaticSiteBuildsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListStaticSiteBuildFunctionsNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.ListStaticSiteBuildFunctionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the functions of a particular static site build. - /// - /// - /// Description for Gets the functions of a particular static site build. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteBuildFunctionsNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteBuildFunctionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetUserProvidedFunctionAppsForStaticSiteBuildNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.GetUserProvidedFunctionAppsForStaticSiteBuildNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site build - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site build - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetUserProvidedFunctionAppsForStaticSiteBuildNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteBuildNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListStaticSiteCustomDomainsNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.ListStaticSiteCustomDomainsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all static site custom domains for a particular static site. - /// - /// - /// Description for Gets all static site custom domains for a particular static - /// site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteCustomDomainsNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteCustomDomainsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListStaticSiteFunctionsNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.ListStaticSiteFunctionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the functions of a static site. - /// - /// - /// Description for Gets the functions of a static site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListStaticSiteFunctionsNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListStaticSiteFunctionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetPrivateEndpointConnectionListNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a static site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetUserProvidedFunctionAppsForStaticSiteNext(this IStaticSitesOperations operations, string nextPageLink) - { - return operations.GetUserProvidedFunctionAppsForStaticSiteNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of the user provided function apps registered with a - /// static site - /// - /// - /// Description for Gets the details of the user provided function apps - /// registered with a static site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetUserProvidedFunctionAppsForStaticSiteNextAsync(this IStaticSitesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetUserProvidedFunctionAppsForStaticSiteNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperations.cs deleted file mode 100644 index 99763205c439..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperations.cs +++ /dev/null @@ -1,960 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - - /// - /// TopLevelDomainsOperations operations. - /// - internal partial class TopLevelDomainsOperations : IServiceOperations, ITopLevelDomainsOperations - { - /// - /// Initializes a new instance of the TopLevelDomainsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal TopLevelDomainsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get details of a top-level domain. - /// - /// - /// Description for Get details of a top-level domain. - /// - /// - /// Name of the top-level domain. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}").ToString(); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// Name of the top-level domain. - /// - /// - /// Domain agreement options. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListAgreementsWithHttpMessagesAsync(string name, TopLevelDomainAgreementOption agreementOption, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (agreementOption == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "agreementOption"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("agreementOption", agreementOption); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAgreements", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.DomainRegistration/topLevelDomains/{name}/listAgreements").ToString(); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(agreementOption != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(agreementOption, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// 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>> ListAgreementsNextWithHttpMessagesAsync(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, "ListAgreementsNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperationsExtensions.cs deleted file mode 100644 index 473cf51c4da6..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/TopLevelDomainsOperationsExtensions.cs +++ /dev/null @@ -1,233 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for TopLevelDomainsOperations. - /// - public static partial class TopLevelDomainsOperationsExtensions - { - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this ITopLevelDomainsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this ITopLevelDomainsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get details of a top-level domain. - /// - /// - /// Description for Get details of a top-level domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the top-level domain. - /// - public static TopLevelDomain Get(this ITopLevelDomainsOperations operations, string name) - { - return operations.GetAsync(name).GetAwaiter().GetResult(); - } - - /// - /// Get details of a top-level domain. - /// - /// - /// Description for Get details of a top-level domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the top-level domain. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this ITopLevelDomainsOperations operations, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the top-level domain. - /// - /// - /// Domain agreement options. - /// - public static IPage ListAgreements(this ITopLevelDomainsOperations operations, string name, TopLevelDomainAgreementOption agreementOption) - { - return operations.ListAgreementsAsync(name, agreementOption).GetAwaiter().GetResult(); - } - - /// - /// Gets all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the top-level domain. - /// - /// - /// Domain agreement options. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAgreementsAsync(this ITopLevelDomainsOperations operations, string name, TopLevelDomainAgreementOption agreementOption, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAgreementsWithHttpMessagesAsync(name, agreementOption, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this ITopLevelDomainsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all top-level domains supported for registration. - /// - /// - /// Description for Get all top-level domains supported for registration. - /// - /// - /// 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 ITopLevelDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListAgreementsNext(this ITopLevelDomainsOperations operations, string nextPageLink) - { - return operations.ListAgreementsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all legal agreements that user needs to accept before purchasing a - /// domain. - /// - /// - /// Description for Gets all legal agreements that user needs to accept before - /// purchasing a domain. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAgreementsNextAsync(this ITopLevelDomainsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAgreementsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs deleted file mode 100644 index 4fff300c7386..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperations.cs +++ /dev/null @@ -1,99341 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.IO; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// WebAppsOperations operations. - /// - internal partial class WebAppsOperations : IServiceOperations, IWebAppsOperations - { - /// - /// Initializes a new instance of the WebAppsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal WebAppsOperations(WebSiteManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the WebSiteManagementClient - /// - public WebSiteManagementClient Client { get; private set; } - - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a 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.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/sites").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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Specify <strong>true</strong> to include deployment slots in - /// results. The default is false, which only gives you the production slot of - /// all apps. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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, bool? includeSlots = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("includeSlots", includeSlots); - 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.Web/sites").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (includeSlots != null) - { - _queryParameters.Add(string.Format("includeSlots={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(includeSlots, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - 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.Web/sites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - /// - /// 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 name, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("deleteMetrics", deleteMetrics); - tracingParameters.Add("deleteEmptyServerFarm", deleteEmptyServerFarm); - 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.Web/sites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (deleteMetrics != null) - { - _queryParameters.Add(string.Format("deleteMetrics={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteMetrics, Client.SerializationSettings).Trim('"')))); - } - if (deleteEmptyServerFarm != null) - { - _queryParameters.Add(string.Format("deleteEmptyServerFarm={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteEmptyServerFarm, 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 (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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, SitePatchResource siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - 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.Web/sites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Custom hostname. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> AnalyzeCustomHostnameWithHttpMessagesAsync(string resourceGroupName, string name, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AnalyzeCustomHostname", 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.Web/sites/{name}/analyzeCustomHostname").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (hostName != null) - { - _queryParameters.Add(string.Format("hostName={0}", System.Uri.EscapeDataString(hostName))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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 ApplySlotConfigToProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ApplySlotConfigToProduction", 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.Web/sites/{name}/applySlotConfig").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BackupWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Backup", 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.Web/sites/{name}/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackups", 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.Web/sites/{name}/backups").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBackupStatusWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupStatus", 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.Web/sites/{name}/backups/{backupId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// 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 DeleteBackupWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackup", 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.Web/sites/{name}/backups/{backupId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListBackupStatusSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupStatusSecrets", 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.Web/sites/{name}/backups/{backupId}/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreWithHttpMessagesAsync(resourceGroupName, name, backupId, request, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPolicies", 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.Web/sites/{name}/basicPublishingCredentialsPolicies").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetFtpAllowedWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFtpAllowed", 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.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateFtpAllowedWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (csmPublishingAccessPoliciesEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); - } - if (csmPublishingAccessPoliciesEntity != null) - { - csmPublishingAccessPoliciesEntity.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateFtpAllowed", 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.Web/sites/{name}/basicPublishingCredentialsPolicies/ftp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(csmPublishingAccessPoliciesEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetScmAllowedWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetScmAllowed", 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.Web/sites/{name}/basicPublishingCredentialsPolicies/scm").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateScmAllowedWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (csmPublishingAccessPoliciesEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); - } - if (csmPublishingAccessPoliciesEntity != null) - { - csmPublishingAccessPoliciesEntity.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateScmAllowed", 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.Web/sites/{name}/basicPublishingCredentialsPolicies/scm").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(csmPublishingAccessPoliciesEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListConfigurationsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurations", 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.Web/sites/{name}/config").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateApplicationSettingsWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateApplicationSettings", 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.Web/sites/{name}/config/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListApplicationSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListApplicationSettings", 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.Web/sites/{name}/config/appsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAuthSettingsWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteAuthSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteAuthSettings", siteAuthSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettings", 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.Web/sites/{name}/config/authsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteAuthSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettings", 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.Web/sites/{name}/config/authsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2WithoutSecrets", 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.Web/sites/{name}/config/authsettingsV2").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteAuthSettingsV2 == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2", 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.Web/sites/{name}/config/authsettingsV2").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteAuthSettingsV2 != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettingsV2, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsV2WithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2", 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.Web/sites/{name}/config/authsettingsV2/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (azureStorageAccounts == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccounts", 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.Web/sites/{name}/config/azurestorageaccounts").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(azureStorageAccounts != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(azureStorageAccounts, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListAzureStorageAccountsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccounts", 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.Web/sites/{name}/config/azurestorageaccounts/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfiguration", 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.Web/sites/{name}/config/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DeleteBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfiguration", 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.Web/sites/{name}/config/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBackupConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfiguration", 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.Web/sites/{name}/config/backup/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferences", 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.Web/sites/{name}/config/configreferences/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettingKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettingKey", appSettingKey); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingKeyVaultReference", 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.Web/sites/{name}/config/configreferences/appsettings/{appSettingKey}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{appSettingKey}", System.Uri.EscapeDataString(appSettingKey)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferences", 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.Web/sites/{name}/config/configreferences/connectionstrings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionStringKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionStringKey", connectionStringKey); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReference", 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.Web/sites/{name}/config/configreferences/connectionstrings/{connectionStringKey}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{connectionStringKey}", System.Uri.EscapeDataString(connectionStringKey)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionStrings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionStrings", connectionStrings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStrings", 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.Web/sites/{name}/config/connectionstrings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(connectionStrings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionStrings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListConnectionStringsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStrings", 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.Web/sites/{name}/config/connectionstrings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDiagnosticLogsConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfiguration", 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.Web/sites/{name}/config/logs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" 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> UpdateDiagnosticLogsConfigWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteLogsConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteLogsConfig"); - } - if (siteLogsConfig != null) - { - siteLogsConfig.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteLogsConfig", siteLogsConfig); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfig", 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.Web/sites/{name}/config/logs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteLogsConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteLogsConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateMetadataWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (metadata == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("metadata", metadata); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadata", 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.Web/sites/{name}/config/metadata").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(metadata != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListMetadataWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetadata", 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.Web/sites/{name}/config/metadata/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginListPublishingCredentialsWithHttpMessagesAsync(resourceGroupName, name, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (pushSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); - } - if (pushSettings != null) - { - pushSettings.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("pushSettings", pushSettings); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettings", 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.Web/sites/{name}/config/pushsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(pushSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pushSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSitePushSettingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettings", 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.Web/sites/{name}/config/pushsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 names of app settings and connection strings that stick to the - /// slot (not swapped). - /// - /// - /// Description for Gets the names of app settings and connection strings that - /// stick to the slot (not swapped). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotConfigurationNames", 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.Web/sites/{name}/config/slotConfigNames").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the names of application settings and connection string that remain - /// with the slot during swap operation. - /// - /// - /// Description for Updates the names of application settings and connection - /// string that remain with the slot during swap operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Names of application settings and connection strings. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSlotConfigurationNamesWithHttpMessagesAsync(string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotConfigNames == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotConfigNames"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotConfigNames", slotConfigNames); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSlotConfigurationNames", 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.Web/sites/{name}/config/slotConfigNames").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(slotConfigNames != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotConfigNames, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfiguration", 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.Web/sites/{name}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); - } - if (siteConfig != null) - { - siteConfig.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteConfig", siteConfig); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfiguration", 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.Web/sites/{name}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateConfigurationWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteConfig", siteConfig); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConfiguration", 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.Web/sites/{name}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListConfigurationSnapshotInfoWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfo", 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.Web/sites/{name}/config/web/snapshots").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("snapshotId", snapshotId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshot", 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.Web/sites/{name}/config/web/snapshots/{snapshotId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// 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 RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("snapshotId", snapshotId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshot", 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.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetWebSiteContainerLogsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebSiteContainerLogs", 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.Web/sites/{name}/containerlogs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetContainerLogsZipWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContainerLogsZip", 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.Web/sites/{name}/containerlogs/zip/download").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListContinuousWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobs", 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.Web/sites/{name}/continuouswebjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJob", 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.Web/sites/{name}/continuouswebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 DeleteContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJob", 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.Web/sites/{name}/continuouswebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 StartContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJob", 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.Web/sites/{name}/continuouswebjobs/{webJobName}/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 StopContinuousWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJob", 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.Web/sites/{name}/continuouswebjobs/{webJobName}/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListDeploymentsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeployments", 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.Web/sites/{name}/deployments").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeployment", 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.Web/sites/{name}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Deployment details. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (deployment == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("deployment", deployment); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateDeployment", 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.Web/sites/{name}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _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(deployment != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployment, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// 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 DeleteDeploymentWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDeployment", 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.Web/sites/{name}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListDeploymentLogWithHttpMessagesAsync(string resourceGroupName, string name, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLog", 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.Web/sites/{name}/deployments/{id}/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> DiscoverBackupWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackup", 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.Web/sites/{name}/discoverbackup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListDomainOwnershipIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiers", 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.Web/sites/{name}/domainOwnershipIdentifiers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership 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> GetDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifier", 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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifier", 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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// 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 DeleteDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifier", 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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateDomainOwnershipIdentifierWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifier", 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.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMSDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatus", 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.Web/sites/{name}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLog", 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.Web/sites/{name}/extensions/MSDeploy/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke onedeploy status API /api/deployments and gets the deployment status - /// for the site - /// - /// - /// Description for Invoke onedeploy status API /api/deployments and gets the - /// deployment status for the site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetOneDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetOneDeployStatus", 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.Web/sites/{name}/extensions/onedeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the OneDeploy publish web app extension. - /// - /// - /// Description for Invoke the OneDeploy publish web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOneDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOneDeployOperation", 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.Web/sites/{name}/extensions/onedeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 200) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctions", 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.Web/sites/{name}/functions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetFunctionsAdminTokenWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunctionsAdminToken", 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.Web/sites/{name}/functions/admin/token").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunction", 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.Web/sites/{name}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunction", 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.Web/sites/{name}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or 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> CreateOrUpdateFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("key", key); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecret", 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.Web/sites/{name}/functions/{functionName}/keys/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _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(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// 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 DeleteFunctionSecretWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecret", 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.Web/sites/{name}/functions/{functionName}/keys/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListFunctionKeysWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeys", 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.Web/sites/{name}/functions/{functionName}/listkeys").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListFunctionSecretsWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecrets", 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.Web/sites/{name}/functions/{functionName}/listsecrets").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListHostKeysWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostKeys", 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.Web/sites/{name}/host/default/listkeys").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ListSyncStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatus", 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.Web/sites/{name}/host/default/listsyncstatus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 SyncFunctionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctions", 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.Web/sites/{name}/host/default/sync").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or 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> CreateOrUpdateHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("key", key); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecret", 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.Web/sites/{name}/host/default/{keyType}/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _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(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// 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 DeleteHostSecretWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecret", 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.Web/sites/{name}/host/default/{keyType}/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListHostNameBindingsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindings", 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.Web/sites/{name}/hostNameBindings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBinding", 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.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (hostNameBinding == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("hostNameBinding", hostNameBinding); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBinding", 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.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _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(hostNameBinding != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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 DeleteHostNameBindingWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBinding", 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.Web/sites/{name}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnection", 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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnection", 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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// 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 DeleteHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnection", 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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateHybridConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnection", 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.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListHybridConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnections", 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.Web/sites/{name}/hybridConnectionRelays").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListRelayServiceConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnections", 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.Web/sites/{name}/hybridconnection").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnection", 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.Web/sites/{name}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnection", 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.Web/sites/{name}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// 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 DeleteRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnection", 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.Web/sites/{name}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateRelayServiceConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnection", 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.Web/sites/{name}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceIdentifiersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiers", 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.Web/sites/{name}/instances").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceInfoWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfo", 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.Web/sites/{name}/instances/{instanceId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app 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> GetInstanceMsDeployStatusWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatus", 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.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, instanceId, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app 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> GetInstanceMSDeployLogWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLog", 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.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessesWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcesses", 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.Web/sites/{name}/instances/{instanceId}/processes").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcess", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// 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 DeleteInstanceProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcess", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDump", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}/dump").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModules", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModule", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreads", 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.Web/sites/{name}/instances/{instanceId}/processes/{processId}/threads").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> IsCloneableWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "IsCloneable", 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.Web/sites/{name}/iscloneable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteBackupsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackups", 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.Web/sites/{name}/listbackups").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggers", 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.Web/sites/{name}/listsyncfunctiontriggerstatus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> MigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginMigrateStorageWithHttpMessagesAsync(subscriptionName, resourceGroupName, name, migrationOptions, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> MigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginMigrateMySqlWithHttpMessagesAsync(resourceGroupName, name, migrationRequestEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMigrateMySqlStatusWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatus", 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.Web/sites/{name}/migratemysql/status").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSwiftVirtualNetworkConnectionWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnection", 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.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck", 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.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 DeleteSwiftVirtualNetworkWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetwork", 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.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnectionWithCheck", 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.Web/sites/{name}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListNetworkFeaturesWithHttpMessagesAsync(string resourceGroupName, string name, string view, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (view == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "view"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("view", view); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeatures", 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.Web/sites/{name}/networkFeatures/{view}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperation", 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.Web/sites/{name}/networkTrace/operationresults/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> StartWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTrace", 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.Web/sites/{name}/networkTrace/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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 StopWebSiteNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTrace", 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.Web/sites/{name}/networkTrace/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTracesWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraces", 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.Web/sites/{name}/networkTrace/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTraceOperationV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationV2", 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.Web/sites/{name}/networkTraces/current/operationresults/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of 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>> GetNetworkTracesV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesV2", 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.Web/sites/{name}/networkTraces/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 GenerateNewSitePublishingPasswordWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPassword", 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.Web/sites/{name}/newpassword").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListPerfMonCountersWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCounters", 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.Web/sites/{name}/perfcounters").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSitePhpErrorLogFlagWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlag", 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.Web/sites/{name}/phplogging").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListPremierAddOnsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOns", 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.Web/sites/{name}/premieraddons").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOn", 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.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> AddPremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (premierAddOn != null) - { - premierAddOn.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOn", 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.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _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(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeletePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOn", 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.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdatePremierAddOnWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOn", 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.Web/sites/{name}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _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(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateAccessWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccess", 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.Web/sites/{name}/privateAccess/virtualNetworks").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> PutPrivateAccessVnetWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (access == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "access"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("access", access); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnet", 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.Web/sites/{name}/privateAccess/virtualNetworks").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(access != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetPrivateEndpointConnectionListWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionList", 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.Web/sites/{name}/privateEndpointConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnection", 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.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateLinkResourcesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResources", 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.Web/sites/{name}/privateLinkResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListProcessesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcesses", 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.Web/sites/{name}/processes").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcess", 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.Web/sites/{name}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// 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 DeleteProcessWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteProcess", 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.Web/sites/{name}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessDumpWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessDump", 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.Web/sites/{name}/processes/{processId}/dump").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListProcessModulesWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModules", 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.Web/sites/{name}/processes/{processId}/modules").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessModuleWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessModule", 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.Web/sites/{name}/processes/{processId}/modules/{baseAddress}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListProcessThreadsWithHttpMessagesAsync(string resourceGroupName, string name, string processId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreads", 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.Web/sites/{name}/processes/{processId}/threads").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListPublicCertificatesWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificates", 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.Web/sites/{name}/publicCertificates").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetPublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificate", 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.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdatePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (publicCertificate == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("publicCertificate", publicCertificate); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificate", 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.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _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(publicCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeletePublicCertificateWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificate", 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.Web/sites/{name}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> ListPublishingProfileXmlWithSecretsWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publishingProfileOptions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecrets", 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.Web/sites/{name}/publishxml").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(publishingProfileOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, 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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 ResetProductionSlotConfigWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetProductionSlotConfig", 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.Web/sites/{name}/resetSlotConfig").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - /// - /// 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 RestartWithHttpMessagesAsync(string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("synchronous", synchronous); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Restart", 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.Web/sites/{name}/restart").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); - } - if (synchronous != null) - { - _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromBackupBlobWithHttpMessagesAsync(resourceGroupName, name, request, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromDeletedAppWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSnapshotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSiteExtensionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensions", 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.Web/sites/{name}/siteextensions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtension", 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.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> InstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginInstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeleteSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtension", 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.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSlotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlots", 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.Web/sites/{name}/slots").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns the production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSlot", 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.Web/sites/{name}/slots/{slot}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// Name of the deployment slot to delete. By default, the API deletes the - /// production slot. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - /// - /// 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 DeleteSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("deleteMetrics", deleteMetrics); - tracingParameters.Add("deleteEmptyServerFarm", deleteEmptyServerFarm); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSlot", 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.Web/sites/{name}/slots/{slot}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (deleteMetrics != null) - { - _queryParameters.Add(string.Format("deleteMetrics={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteMetrics, Client.SerializationSettings).Trim('"')))); - } - if (deleteEmptyServerFarm != null) - { - _queryParameters.Add(string.Format("deleteEmptyServerFarm={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(deleteEmptyServerFarm, 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 (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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSlot", 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.Web/sites/{name}/slots/{slot}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Custom hostname. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> AnalyzeCustomHostnameSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AnalyzeCustomHostnameSlot", 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.Web/sites/{name}/slots/{slot}/analyzeCustomHostname").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (hostName != null) - { - _queryParameters.Add(string.Format("hostName={0}", System.Uri.EscapeDataString(hostName))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// 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 ApplySlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ApplySlotConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/applySlotConfig").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a backup for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BackupSlot", 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.Web/sites/{name}/slots/{slot}/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupsSlot", 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.Web/sites/{name}/slots/{slot}/backups").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// backup of the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBackupStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupStatusSlot", 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.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a backup of the production slot. - /// - /// - /// 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 DeleteBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupSlot", 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.Web/sites/{name}/slots/{slot}/backups/{backupId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListBackupStatusSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBackupStatusSecretsSlot", 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.Web/sites/{name}/slots/{slot}/backups/{backupId}/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBasicPublishingCredentialsPoliciesSlot", 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.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFtpAllowedSlot", 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.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateFtpAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (csmPublishingAccessPoliciesEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); - } - if (csmPublishingAccessPoliciesEntity != null) - { - csmPublishingAccessPoliciesEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateFtpAllowedSlot", 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.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/ftp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(csmPublishingAccessPoliciesEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetScmAllowedSlot", 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.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateScmAllowedSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (csmPublishingAccessPoliciesEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "csmPublishingAccessPoliciesEntity"); - } - if (csmPublishingAccessPoliciesEntity != null) - { - csmPublishingAccessPoliciesEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("csmPublishingAccessPoliciesEntity", csmPublishingAccessPoliciesEntity); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateScmAllowedSlot", 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.Web/sites/{name}/slots/{slot}/basicPublishingCredentialsPolicies/scm").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(csmPublishingAccessPoliciesEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(csmPublishingAccessPoliciesEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListConfigurationsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationsSlot", 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.Web/sites/{name}/slots/{slot}/config").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the application settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary appSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettings"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettings", appSettings); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateApplicationSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(appSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(appSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the application settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListApplicationSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListApplicationSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/appsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteAuthSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettings"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteAuthSettings", siteAuthSettings); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/authsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteAuthSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/authsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsV2WithoutSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2WithoutSecretsSlot", 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.Web/sites/{name}/slots/{slot}/config/authsettingsV2").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteAuthSettingsV2 == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteAuthSettingsV2"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteAuthSettingsV2", siteAuthSettingsV2); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAuthSettingsV2Slot", 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.Web/sites/{name}/slots/{slot}/config/authsettingsV2").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteAuthSettingsV2 != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteAuthSettingsV2, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetAuthSettingsV2SlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAuthSettingsV2Slot", 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.Web/sites/{name}/slots/{slot}/config/authsettingsV2/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (azureStorageAccounts == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "azureStorageAccounts"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("azureStorageAccounts", azureStorageAccounts); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateAzureStorageAccountsSlot", 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.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(azureStorageAccounts != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(azureStorageAccounts, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListAzureStorageAccountsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListAzureStorageAccountsSlot", 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.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, BackupRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateBackupConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. - /// - /// - /// 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 DeleteBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteBackupConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/backup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetBackupConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetBackupConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/backup/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingsKeyVaultReferencesSlot", 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.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string appSettingKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (appSettingKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "appSettingKey"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("appSettingKey", appSettingKey); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetAppSettingKeyVaultReferenceSlot", 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.Web/sites/{name}/slots/{slot}/config/configreferences/appsettings/{appSettingKey}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{appSettingKey}", System.Uri.EscapeDataString(appSettingKey)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferencesSlot", 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.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string connectionStringKey, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionStringKey == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStringKey"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionStringKey", connectionStringKey); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteConnectionStringKeyVaultReferenceSlot", 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.Web/sites/{name}/slots/{slot}/config/configreferences/connectionstrings/{connectionStringKey}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{connectionStringKey}", System.Uri.EscapeDataString(connectionStringKey)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the connection settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionStrings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionStrings"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionStrings", connectionStrings); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConnectionStringsSlot", 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.Web/sites/{name}/slots/{slot}/config/connectionstrings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionStrings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionStrings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the connection settings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListConnectionStringsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConnectionStringsSlot", 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.Web/sites/{name}/slots/{slot}/config/connectionstrings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the logging configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDiagnosticLogsConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDiagnosticLogsConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/logs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the logging configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateDiagnosticLogsConfigSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteLogsConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteLogsConfig"); - } - if (siteLogsConfig != null) - { - siteLogsConfig.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteLogsConfig", siteLogsConfig); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDiagnosticLogsConfigSlot", 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.Web/sites/{name}/slots/{slot}/config/logs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteLogsConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteLogsConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the metadata for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, StringDictionary metadata, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (metadata == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "metadata"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("metadata", metadata); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateMetadataSlot", 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.Web/sites/{name}/slots/{slot}/config/metadata").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(metadata != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(metadata, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the metadata for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListMetadataSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListMetadataSlot", 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.Web/sites/{name}/slots/{slot}/config/metadata/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginListPublishingCredentialsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, PushSettings pushSettings, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (pushSettings == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "pushSettings"); - } - if (pushSettings != null) - { - pushSettings.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("pushSettings", pushSettings); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSitePushSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/pushsettings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(pushSettings != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(pushSettings, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSitePushSettingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSitePushSettingsSlot", 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.Web/sites/{name}/slots/{slot}/config/pushsettings/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); - } - if (siteConfig != null) - { - siteConfig.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteConfig", siteConfig); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteConfig == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteConfig"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteConfig", siteConfig); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/config/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteConfig != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteConfig, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListConfigurationSnapshotInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListConfigurationSnapshotInfoSlot", 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.Web/sites/{name}/slots/{slot}/config/web/snapshots").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("snapshotId", snapshotId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetConfigurationSnapshotSlot", 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.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// 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 RecoverSiteConfigurationSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, string snapshotId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (snapshotId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "snapshotId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("snapshotId", snapshotId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RecoverSiteConfigurationSnapshotSlot", 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.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{snapshotId}", System.Uri.EscapeDataString(snapshotId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetWebSiteContainerLogsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebSiteContainerLogsSlot", 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.Web/sites/{name}/slots/{slot}/containerlogs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetContainerLogsZipSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContainerLogsZipSlot", 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.Web/sites/{name}/slots/{slot}/containerlogs/zip/download").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListContinuousWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListContinuousWebJobsSlot", 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.Web/sites/{name}/slots/{slot}/continuouswebjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetContinuousWebJobSlot", 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.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// 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 DeleteContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteContinuousWebJobSlot", 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.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// 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 StartContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartContinuousWebJobSlot", 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.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// 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 StopContinuousWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopContinuousWebJobSlot", 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.Web/sites/{name}/slots/{slot}/continuouswebjobs/{webJobName}/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListDeploymentsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentsSlot", 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.Web/sites/{name}/slots/{slot}/deployments").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets a - /// deployment for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDeploymentSlot", 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.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API creates a - /// deployment for the production slot. - /// - /// - /// Deployment details. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Deployment deployment, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (deployment == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "deployment"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("slot", slot); - tracingParameters.Add("deployment", deployment); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateDeploymentSlot", 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.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(deployment != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(deployment, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// 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 DeleteDeploymentSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDeploymentSlot", 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.Web/sites/{name}/slots/{slot}/deployments/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListDeploymentLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("id", id); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDeploymentLogSlot", 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.Web/sites/{name}/slots/{slot}/deployments/{id}/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// perform discovery for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> DiscoverBackupSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DiscoverBackupSlot", 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.Web/sites/{name}/slots/{slot}/discoverbackup").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListDomainOwnershipIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListDomainOwnershipIdentifiersSlot", 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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetDomainOwnershipIdentifierSlot", 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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateDomainOwnershipIdentifierSlot", 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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// 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 DeleteDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteDomainOwnershipIdentifierSlot", 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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (domainOwnershipIdentifierName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifierName"); - } - if (domainOwnershipIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "domainOwnershipIdentifier"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("domainOwnershipIdentifierName", domainOwnershipIdentifierName); - tracingParameters.Add("domainOwnershipIdentifier", domainOwnershipIdentifier); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateDomainOwnershipIdentifierSlot", 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.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{domainOwnershipIdentifierName}", System.Uri.EscapeDataString(domainOwnershipIdentifierName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(domainOwnershipIdentifier != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(domainOwnershipIdentifier, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMSDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployStatusSlot", 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.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMSDeployLogSlot", 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.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceFunctionsSlot", 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.Web/sites/{name}/slots/{slot}/functions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetFunctionsAdminTokenSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetFunctionsAdminTokenSlot", 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.Web/sites/{name}/slots/{slot}/functions/admin/token").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceFunctionSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, functionEnvelope, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceFunctionSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or 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> CreateOrUpdateFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("key", key); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateFunctionSecretSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteFunctionSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteFunctionSecretSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}/keys/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListFunctionKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionKeysSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}/listkeys").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListFunctionSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListFunctionSecretsSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}/listsecrets").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListHostKeysSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostKeysSlot", 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.Web/sites/{name}/slots/{slot}/host/default/listkeys").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 ListSyncStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncStatusSlot", 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.Web/sites/{name}/slots/{slot}/host/default/listsyncstatus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 SyncFunctionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionsSlot", 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.Web/sites/{name}/slots/{slot}/host/default/sync").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or 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> CreateOrUpdateHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (key == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "key"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("key", key); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostSecretSlot", 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.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(key != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(key, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 DeleteHostSecretSlotWithHttpMessagesAsync(string resourceGroupName, string name, string keyType, string keyName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (keyType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyType"); - } - if (keyName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "keyName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("keyType", keyType); - tracingParameters.Add("keyName", keyName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostSecretSlot", 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.Web/sites/{name}/slots/{slot}/host/default/{keyType}/{keyName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{keyType}", System.Uri.EscapeDataString(keyType)); - _url = _url.Replace("{keyName}", System.Uri.EscapeDataString(keyName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListHostNameBindingsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHostNameBindingsSlot", 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.Web/sites/{name}/slots/{slot}/hostNameBindings").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHostNameBindingSlot", 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.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (hostNameBinding == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostNameBinding"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("hostNameBinding", hostNameBinding); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHostNameBindingSlot", 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.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(hostNameBinding != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(hostNameBinding, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// 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 DeleteHostNameBindingSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string hostName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (hostName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "hostName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("hostName", hostName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHostNameBindingSlot", 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.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{hostName}", System.Uri.EscapeDataString(hostName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetHybridConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateHybridConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// 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 DeleteHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteHybridConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateHybridConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (namespaceName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "namespaceName"); - } - if (relayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "relayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("namespaceName", namespaceName); - tracingParameters.Add("relayName", relayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateHybridConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{namespaceName}", System.Uri.EscapeDataString(namespaceName)); - _url = _url.Replace("{relayName}", System.Uri.EscapeDataString(relayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListHybridConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListHybridConnectionsSlot", 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.Web/sites/{name}/slots/{slot}/hybridConnectionRelays").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// hybrid connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListRelayServiceConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListRelayServiceConnectionsSlot", 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.Web/sites/{name}/slots/{slot}/hybridconnection").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// hybrid connection for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetRelayServiceConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateRelayServiceConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a hybrid connection for the production slot. - /// - /// - /// 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 DeleteRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteRelayServiceConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateRelayServiceConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (entityName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "entityName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("entityName", entityName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateRelayServiceConnectionSlot", 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.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{entityName}", System.Uri.EscapeDataString(entityName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceIdentifiersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceIdentifiersSlot", 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.Web/sites/{name}/slots/{slot}/instances").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceInfoSlotWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceInfoSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app 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> GetInstanceMsDeployStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMsDeployStatusSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, mSDeploy, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app 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> GetInstanceMSDeployLogSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceMSDeployLogSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessesSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// 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 DeleteInstanceProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteInstanceProcessSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessDumpSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessModulesSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetInstanceProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetInstanceProcessModuleSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListInstanceProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListInstanceProcessThreadsSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns information on - /// the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> IsCloneableSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "IsCloneableSlot", 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.Web/sites/{name}/slots/{slot}/iscloneable").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteBackupsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteBackupsSlot", 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.Web/sites/{name}/slots/{slot}/listbackups").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSyncFunctionTriggersSlot", 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.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetMigrateMySqlStatusSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetMigrateMySqlStatusSlot", 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.Web/sites/{name}/slots/{slot}/migratemysql/status").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSwiftVirtualNetworkConnectionSlot", 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.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot", 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.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - /// - /// 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 DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSwiftVirtualNetworkSlot", 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.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSwiftVirtualNetworkConnectionWithCheckSlot", 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.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// network features for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListNetworkFeaturesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string view, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (view == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "view"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("view", view); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNetworkFeaturesSlot", 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.Web/sites/{name}/slots/{slot}/networkFeatures/{view}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{view}", System.Uri.EscapeDataString(view)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlot", 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.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartWebSiteNetworkTraceSlot", 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.Web/sites/{name}/slots/{slot}/networkTrace/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// 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 StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopWebSiteNetworkTraceSlot", 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.Web/sites/{name}/slots/{slot}/networkTrace/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetNetworkTracesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlot", 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.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTraceOperationSlotV2", 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.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetNetworkTracesSlotV2WithHttpMessagesAsync(string resourceGroupName, string name, string operationId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (operationId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "operationId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("operationId", operationId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetNetworkTracesSlotV2", 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.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{operationId}", System.Uri.EscapeDataString(operationId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API generate a - /// new publishing password for the production slot. - /// - /// - /// 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 GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GenerateNewSitePublishingPasswordSlot", 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.Web/sites/{name}/slots/{slot}/newpassword").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListPerfMonCountersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPerfMonCountersSlot", 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.Web/sites/{name}/slots/{slot}/perfcounters").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSitePhpErrorLogFlagSlot", 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.Web/sites/{name}/slots/{slot}/phplogging").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the premier add-ons for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListPremierAddOnsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPremierAddOnsSlot", 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.Web/sites/{name}/slots/{slot}/premieraddons").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named add-on for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPremierAddOnSlot", 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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> AddPremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (premierAddOn != null) - { - premierAddOn.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "AddPremierAddOnSlot", 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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the named add-on for the production slot. - /// - /// - /// 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 DeletePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePremierAddOnSlot", 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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdatePremierAddOnSlotWithHttpMessagesAsync(string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (premierAddOnName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOnName"); - } - if (premierAddOn == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "premierAddOn"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("premierAddOnName", premierAddOnName); - tracingParameters.Add("premierAddOn", premierAddOn); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePremierAddOnSlot", 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.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{premierAddOnName}", System.Uri.EscapeDataString(premierAddOnName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(premierAddOn != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(premierAddOn, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateAccessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateAccessSlot", 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.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// The name of the slot for the web app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> PutPrivateAccessVnetSlotWithHttpMessagesAsync(string resourceGroupName, string name, PrivateAccess access, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (access == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "access"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("access", access); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "PutPrivateAccessVnetSlot", 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.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(access != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(access, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionListSlot", 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.Web/sites/{name}/slots/{slot}/privateEndpointConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateEndpointConnectionSlot", 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.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPrivateLinkResourcesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPrivateLinkResourcesSlot", 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.Web/sites/{name}/slots/{slot}/privateLinkResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListProcessesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessesSlot", 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.Web/sites/{name}/slots/{slot}/processes").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// 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 DeleteProcessSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteProcessSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessDumpSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessDumpSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}/dump").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListProcessModulesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessModulesSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}/modules").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetProcessModuleSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string baseAddress, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (baseAddress == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "baseAddress"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("baseAddress", baseAddress); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetProcessModuleSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}/modules/{baseAddress}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{baseAddress}", System.Uri.EscapeDataString(baseAddress)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListProcessThreadsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string processId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (processId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "processId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("processId", processId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListProcessThreadsSlot", 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.Web/sites/{name}/slots/{slot}/processes/{processId}/threads").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{processId}", System.Uri.EscapeDataString(processId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListPublicCertificatesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublicCertificatesSlot", 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.Web/sites/{name}/slots/{slot}/publicCertificates").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetPublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetPublicCertificateSlot", 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.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (publicCertificate == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificate"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("publicCertificate", publicCertificate); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdatePublicCertificateSlot", 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.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(publicCertificate != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publicCertificate, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task DeletePublicCertificateSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string publicCertificateName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (publicCertificateName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publicCertificateName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("publicCertificateName", publicCertificateName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeletePublicCertificateSlot", 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.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{publicCertificateName}", System.Uri.EscapeDataString(publicCertificateName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing profile for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (publishingProfileOptions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "publishingProfileOptions"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("publishingProfileOptions", publishingProfileOptions); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListPublishingProfileXmlWithSecretsSlot", 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.Web/sites/{name}/slots/{slot}/publishxml").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(publishingProfileOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(publishingProfileOptions, 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, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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) - { - _result.Body = await _httpResponse.Content.ReadAsStreamAsync().ConfigureAwait(false); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API resets - /// configuration settings for the production slot. - /// - /// - /// 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 ResetSlotConfigurationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ResetSlotConfigurationSlot", 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.Web/sites/{name}/slots/{slot}/resetSlotConfig").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restart the production slot. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - /// - /// 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 RestartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("softRestart", softRestart); - tracingParameters.Add("synchronous", synchronous); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RestartSlot", 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.Web/sites/{name}/slots/{slot}/restart").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (softRestart != null) - { - _queryParameters.Add(string.Format("softRestart={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(softRestart, Client.SerializationSettings).Trim('"')))); - } - if (synchronous != null) - { - _queryParameters.Add(string.Format("synchronous={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(synchronous, 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task RestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteExtensionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteExtensionsSlot", 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.Web/sites/{name}/slots/{slot}/siteextensions").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSiteExtensionSlot", 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.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> InstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// 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 DeleteSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSiteExtensionSlot", 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.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSlotDifferencesSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesSlot", 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.Web/sites/{name}/slots/{slot}/slotsdiffs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task SwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSnapshotsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsSlot", 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.Web/sites/{name}/slots/{slot}/snapshots").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondarySlot", 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.Web/sites/{name}/slots/{slot}/snapshotsdr").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the source control configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControlSlot", 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.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 201 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the source control configuration for the production slot. - /// - /// - /// - /// - /// 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 DeleteSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("additionalFlags", additionalFlags); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControlSlot", 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.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (additionalFlags != null) - { - _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControlSlot", 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.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will start - /// the production slot. - /// - /// - /// 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 StartSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StartSlot", 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.Web/sites/{name}/slots/{slot}/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will stop - /// the production slot. - /// - /// - /// 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 StopSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopSlot", 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.Web/sites/{name}/slots/{slot}/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// 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 StopNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTraceSlot", 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.Web/sites/{name}/slots/{slot}/stopNetworkTrace").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// 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 SyncRepositorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepositorySlot", 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.Web/sites/{name}/slots/{slot}/sync").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// 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 SyncFunctionTriggersSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggersSlot", 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.Web/sites/{name}/slots/{slot}/syncfunctiontriggers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListTriggeredWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobsSlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobSlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes - /// web job for the production slot. - /// - /// - /// 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 DeleteTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJobSlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistorySlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("id", id); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistorySlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// 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 RunTriggeredWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJobSlot", 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.Web/sites/{name}/slots/{slot}/triggeredwebjobs/{webJobName}/run").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// quota information of the production slot. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListUsagesSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsagesSlot", 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.Web/sites/{name}/slots/{slot}/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// virtual network connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListVnetConnectionsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnectionsSlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named virtual network for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionSlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionSlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - /// - /// 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 DeleteVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnectionSlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionSlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGatewaySlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGatewaySlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGatewaySlot", 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.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListWebJobsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobsSlot", 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.Web/sites/{name}/slots/{slot}/webjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetWebJobSlotWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJobSlot", 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.Web/sites/{name}/slots/{slot}/webjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSlotDifferencesFromProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSlotDifferencesFromProduction", 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.Web/sites/{name}/slotsdiffs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task SwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSnapshotsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshots", 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.Web/sites/{name}/snapshots").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSnapshotsFromDRSecondary", 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.Web/sites/{name}/snapshotsdr").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", 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.Web/sites/{name}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 201 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// 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 DeleteSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, string additionalFlags = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("additionalFlags", additionalFlags); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteSourceControl", 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.Web/sites/{name}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (additionalFlags != null) - { - _queryParameters.Add(string.Format("additionalFlags={0}", System.Uri.EscapeDataString(additionalFlags))); - } - if (Client.ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(Client.ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", 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.Web/sites/{name}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 StartWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Start", 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.Web/sites/{name}/start").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task>> StartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse> _response = await BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 StopWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Stop", 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.Web/sites/{name}/stop").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// 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 StopNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "StopNetworkTrace", 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.Web/sites/{name}/stopNetworkTrace").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// 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 SyncRepositoryWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncRepository", 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.Web/sites/{name}/sync").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// 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 SyncFunctionTriggersWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "SyncFunctionTriggers", 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.Web/sites/{name}/syncfunctiontriggers").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListTriggeredWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobs", 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.Web/sites/{name}/triggeredwebjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJob", 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.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 DeleteTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteTriggeredWebJob", 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.Web/sites/{name}/triggeredwebjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListTriggeredWebJobHistory", 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.Web/sites/{name}/triggeredwebjobs/{webJobName}/history").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetTriggeredWebJobHistoryWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, string id, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (id == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "id"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("id", id); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetTriggeredWebJobHistory", 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.Web/sites/{name}/triggeredwebjobs/{webJobName}/history/{id}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _url = _url.Replace("{id}", System.Uri.EscapeDataString(id)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// 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 RunTriggeredWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "RunTriggeredWebJob", 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.Web/sites/{name}/triggeredwebjobs/{webJobName}/run").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListUsagesWithHttpMessagesAsync(string resourceGroupName, string name, string filter = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("filter", filter); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListUsages", 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.Web/sites/{name}/usages").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 (filter != null) - { - _queryParameters.Add(string.Format("$filter={0}", filter)); - } - 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListVnetConnectionsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListVnetConnections", 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.Web/sites/{name}/virtualNetworkConnections").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnection", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnection", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// 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 DeleteVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "DeleteVnetConnection", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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 != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnection", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetVnetConnectionGateway", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (connectionEnvelope != null) - { - connectionEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CreateOrUpdateVnetConnectionGateway", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateVnetConnectionGatewayWithHttpMessagesAsync(string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (vnetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vnetName"); - } - if (gatewayName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "gatewayName"); - } - if (connectionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "connectionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("vnetName", vnetName); - tracingParameters.Add("gatewayName", gatewayName); - tracingParameters.Add("connectionEnvelope", connectionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateVnetConnectionGateway", 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.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{vnetName}", System.Uri.EscapeDataString(vnetName)); - _url = _url.Replace("{gatewayName}", System.Uri.EscapeDataString(gatewayName)); - _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(connectionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(connectionEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWebJobsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListWebJobs", 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.Web/sites/{name}/webjobs").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetWebJobWithHttpMessagesAsync(string resourceGroupName, string name, string webJobName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (webJobName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "webJobName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("webJobName", webJobName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetWebJob", 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.Web/sites/{name}/webjobs/{webJobName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{webJobName}", System.Uri.EscapeDataString(webJobName)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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 name, Site siteEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) - { - siteEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - 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.Web/sites/{name}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// 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 BeginRestoreWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); - 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.Web/sites/{name}/backups/{backupId}/restore").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginListPublishingCredentialsWithHttpMessagesAsync(string resourceGroupName, string name, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentials", 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.Web/sites/{name}/config/publishingcredentials/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy 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> BeginCreateMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("mSDeploy", mSDeploy); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperation", 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.Web/sites/{name}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, 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 != 409) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateFunctionWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (functionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("functionEnvelope", functionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateFunction", 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.Web/sites/{name}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _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(functionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, 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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("mSDeploy", mSDeploy); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperation", 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.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, 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 != 409) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginMigrateStorageWithHttpMessagesAsync(string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (subscriptionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "subscriptionName"); - } - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (migrationOptions == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationOptions"); - } - if (migrationOptions != null) - { - migrationOptions.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("subscriptionName", subscriptionName); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("name", name); - tracingParameters.Add("migrationOptions", migrationOptions); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateStorage", 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.Web/sites/{name}/migrate").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (subscriptionName != null) - { - _queryParameters.Add(string.Format("subscriptionName={0}", System.Uri.EscapeDataString(subscriptionName))); - } - 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(migrationOptions != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationOptions, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginMigrateMySqlWithHttpMessagesAsync(string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (migrationRequestEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "migrationRequestEnvelope"); - } - if (migrationRequestEnvelope != null) - { - migrationRequestEnvelope.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("migrationRequestEnvelope", migrationRequestEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateMySql", 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.Web/sites/{name}/migratemysql").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(migrationRequestEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(migrationRequestEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperation", 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.Web/sites/{name}/networkTrace/startOperation").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnection", 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.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnection", 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.Web/sites/{name}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _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; - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// 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 BeginRestoreFromBackupBlobWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlob", 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.Web/sites/{name}/restoreFromBackupBlob").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// 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 BeginRestoreFromDeletedAppWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedApp", 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.Web/sites/{name}/restoreFromDeletedApp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// 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 BeginRestoreSnapshotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (restoreRequest != null) - { - restoreRequest.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshot", 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.Web/sites/{name}/restoreSnapshot").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> BeginInstallSiteExtensionWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtension", 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.Web/sites/{name}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _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 != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateSlotWithHttpMessagesAsync(string resourceGroupName, string name, Site siteEnvelope, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteEnvelope"); - } - if (siteEnvelope != null) - { - siteEnvelope.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteEnvelope", siteEnvelope); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSlot", 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.Web/sites/{name}/slots/{slot}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteEnvelope, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// 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 BeginRestoreSlotWithHttpMessagesAsync(string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (backupId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "backupId"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("backupId", backupId); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSlot", 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.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{backupId}", System.Uri.EscapeDataString(backupId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginListPublishingCredentialsSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginListPublishingCredentialsSlot", 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.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy 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> BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("mSDeploy", mSDeploy); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateMSDeployOperationSlot", 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.Web/sites/{name}/slots/{slot}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, 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 != 409) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (functionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (functionEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "functionEnvelope"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("functionName", functionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("functionEnvelope", functionEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceFunctionSlot", 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.Web/sites/{name}/slots/{slot}/functions/{functionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{functionName}", System.Uri.EscapeDataString(functionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(functionEnvelope != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(functionEnvelope, 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) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy 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> BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (mSDeploy == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "mSDeploy"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slot", slot); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("mSDeploy", mSDeploy); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateInstanceMSDeployOperationSlot", 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.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _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(mSDeploy != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(mSDeploy, 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 != 409) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartWebSiteNetworkTraceOperationSlot", 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.Web/sites/{name}/slots/{slot}/networkTrace/startOperation").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (privateEndpointWrapper == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointWrapper"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("privateEndpointWrapper", privateEndpointWrapper); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginApproveOrRejectPrivateEndpointConnectionSlot", 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.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(privateEndpointWrapper != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(privateEndpointWrapper, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string privateEndpointConnectionName, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (privateEndpointConnectionName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "privateEndpointConnectionName"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("privateEndpointConnectionName", privateEndpointConnectionName); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDeletePrivateEndpointConnectionSlot", 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.Web/sites/{name}/slots/{slot}/privateEndpointConnections/{privateEndpointConnectionName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{privateEndpointConnectionName}", System.Uri.EscapeDataString(privateEndpointConnectionName)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 202 && (int)_statusCode != 204) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 204) - { - _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; - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// 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 BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(string resourceGroupName, string name, RestoreRequest request, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (request == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "request"); - } - if (request != null) - { - request.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("request", request); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromBackupBlobSlot", 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.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(request != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(request, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// 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 BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreFromDeletedAppSlot", 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.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// 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 BeginRestoreSnapshotSlotWithHttpMessagesAsync(string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (restoreRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "restoreRequest"); - } - if (restoreRequest != null) - { - restoreRequest.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("restoreRequest", restoreRequest); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginRestoreSnapshotSlot", 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.Web/sites/{name}/slots/{slot}/restoreSnapshot").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(restoreRequest != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(restoreRequest, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginInstallSiteExtensionSlotWithHttpMessagesAsync(string resourceGroupName, string name, string siteExtensionId, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteExtensionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteExtensionId"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteExtensionId", siteExtensionId); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginInstallSiteExtensionSlot", 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.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{siteExtensionId}", System.Uri.EscapeDataString(siteExtensionId)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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 != 200 && (int)_statusCode != 201 && (int)_statusCode != 429) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// 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 BeginSwapSlotSlotWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotSlot", 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.Web/sites/{name}/slots/{slot}/slotsswap").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); - tracingParameters.Add("slot", slot); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControlSlot", 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.Web/sites/{name}/slots/{slot}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _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(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginStartNetworkTraceSlotWithHttpMessagesAsync(string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slot == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slot"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("slot", slot); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTraceSlot", 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.Web/sites/{name}/slots/{slot}/startNetworkTrace").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{slot}", System.Uri.EscapeDataString(slot)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// 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 BeginSwapSlotWithProductionWithHttpMessagesAsync(string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (slotSwapEntity == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "slotSwapEntity"); - } - if (slotSwapEntity != null) - { - slotSwapEntity.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("slotSwapEntity", slotSwapEntity); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginSwapSlotWithProduction", 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.Web/sites/{name}/slotsswap").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(slotSwapEntity != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(slotSwapEntity, 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(string resourceGroupName, string name, SiteSourceControl siteSourceControl, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (siteSourceControl == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "siteSourceControl"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("siteSourceControl", siteSourceControl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdateSourceControl", 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.Web/sites/{name}/sourcecontrols/web").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _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(siteSourceControl != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(siteSourceControl, 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> BeginStartNetworkTraceWithHttpMessagesAsync(string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - 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("name", name); - tracingParameters.Add("durationInSeconds", durationInSeconds); - tracingParameters.Add("maxFrameLength", maxFrameLength); - tracingParameters.Add("sasUrl", sasUrl); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginStartNetworkTrace", 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.Web/sites/{name}/startNetworkTrace").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{name}", System.Uri.EscapeDataString(name)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (durationInSeconds != null) - { - _queryParameters.Add(string.Format("durationInSeconds={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(durationInSeconds, Client.SerializationSettings).Trim('"')))); - } - if (maxFrameLength != null) - { - _queryParameters.Add(string.Format("maxFrameLength={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(maxFrameLength, Client.SerializationSettings).Trim('"')))); - } - if (sasUrl != null) - { - _queryParameters.Add(string.Format("sasUrl={0}", System.Uri.EscapeDataString(sasUrl))); - } - 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 && (int)_statusCode != 202) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 202) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListByResourceGroupNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByResourceGroupNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListBackupsNextWithHttpMessagesAsync(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, "ListBackupsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(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, "ListBasicPublishingCredentialsPoliciesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// 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>> ListConfigurationsNextWithHttpMessagesAsync(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, "ListConfigurationsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(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, "GetAppSettingsKeyVaultReferencesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(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, "GetSiteConnectionStringKeyVaultReferencesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// 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>> ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(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, "ListConfigurationSnapshotInfoNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// 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>> ListContinuousWebJobsNextWithHttpMessagesAsync(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, "ListContinuousWebJobsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// 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>> ListDeploymentsNextWithHttpMessagesAsync(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, "ListDeploymentsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(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, "ListDomainOwnershipIdentifiersNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// 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>> ListFunctionsNextWithHttpMessagesAsync(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, "ListFunctionsNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// 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>> ListHostNameBindingsNextWithHttpMessagesAsync(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, "ListHostNameBindingsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// 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>> ListInstanceIdentifiersNextWithHttpMessagesAsync(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, "ListInstanceIdentifiersNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessesNextWithHttpMessagesAsync(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, "ListInstanceProcessesNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessModulesNextWithHttpMessagesAsync(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, "ListInstanceProcessModulesNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessThreadsNextWithHttpMessagesAsync(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, "ListInstanceProcessThreadsNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListSiteBackupsNextWithHttpMessagesAsync(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, "ListSiteBackupsNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// 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>> ListPerfMonCountersNextWithHttpMessagesAsync(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, "ListPerfMonCountersNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// 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>> GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionListNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessesNextWithHttpMessagesAsync(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, "ListProcessesNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessModulesNextWithHttpMessagesAsync(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, "ListProcessModulesNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessThreadsNextWithHttpMessagesAsync(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, "ListProcessThreadsNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// 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>> ListPublicCertificatesNextWithHttpMessagesAsync(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, "ListPublicCertificatesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// 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>> ListSiteExtensionsNextWithHttpMessagesAsync(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, "ListSiteExtensionsNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// 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>> ListSlotsNextWithHttpMessagesAsync(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, "ListSlotsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListBackupsSlotNextWithHttpMessagesAsync(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, "ListBackupsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// 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>> ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(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, "ListBasicPublishingCredentialsPoliciesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// 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>> ListConfigurationsSlotNextWithHttpMessagesAsync(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, "ListConfigurationsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// 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>> GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(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, "GetAppSettingsKeyVaultReferencesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// 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>> GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(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, "GetSiteConnectionStringKeyVaultReferencesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// 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>> ListConfigurationSnapshotInfoSlotNextWithHttpMessagesAsync(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, "ListConfigurationSnapshotInfoSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// 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>> ListContinuousWebJobsSlotNextWithHttpMessagesAsync(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, "ListContinuousWebJobsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// 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>> ListDeploymentsSlotNextWithHttpMessagesAsync(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, "ListDeploymentsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// 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>> ListDomainOwnershipIdentifiersSlotNextWithHttpMessagesAsync(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, "ListDomainOwnershipIdentifiersSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// 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>> ListInstanceFunctionsSlotNextWithHttpMessagesAsync(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, "ListInstanceFunctionsSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// 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>> ListHostNameBindingsSlotNextWithHttpMessagesAsync(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, "ListHostNameBindingsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// 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>> ListInstanceIdentifiersSlotNextWithHttpMessagesAsync(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, "ListInstanceIdentifiersSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessesSlotNextWithHttpMessagesAsync(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, "ListInstanceProcessesSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessModulesSlotNextWithHttpMessagesAsync(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, "ListInstanceProcessModulesSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// 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>> ListInstanceProcessThreadsSlotNextWithHttpMessagesAsync(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, "ListInstanceProcessThreadsSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// 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>> ListSiteBackupsSlotNextWithHttpMessagesAsync(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, "ListSiteBackupsSlotNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// 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>> ListPerfMonCountersSlotNextWithHttpMessagesAsync(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, "ListPerfMonCountersSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// 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>> GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(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, "GetPrivateEndpointConnectionListSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessesSlotNextWithHttpMessagesAsync(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, "ListProcessesSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessModulesSlotNextWithHttpMessagesAsync(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, "ListProcessModulesSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// 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>> ListProcessThreadsSlotNextWithHttpMessagesAsync(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, "ListProcessThreadsSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// 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>> ListPublicCertificatesSlotNextWithHttpMessagesAsync(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, "ListPublicCertificatesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// 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>> ListSiteExtensionsSlotNextWithHttpMessagesAsync(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, "ListSiteExtensionsSlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// 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>> ListSlotDifferencesSlotNextWithHttpMessagesAsync(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, "ListSlotDifferencesSlotNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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>> ListSnapshotsSlotNextWithHttpMessagesAsync(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, "ListSnapshotsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// 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>> ListSnapshotsFromDRSecondarySlotNextWithHttpMessagesAsync(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, "ListSnapshotsFromDRSecondarySlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobsSlotNextWithHttpMessagesAsync(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, "ListTriggeredWebJobsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobHistorySlotNextWithHttpMessagesAsync(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, "ListTriggeredWebJobHistorySlotNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// 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>> ListUsagesSlotNextWithHttpMessagesAsync(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, "ListUsagesSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// 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>> ListWebJobsSlotNextWithHttpMessagesAsync(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, "ListWebJobsSlotNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// 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>> ListSlotDifferencesFromProductionNextWithHttpMessagesAsync(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, "ListSlotDifferencesFromProductionNext", 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("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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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>> ListSnapshotsNextWithHttpMessagesAsync(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, "ListSnapshotsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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; - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// 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>> ListSnapshotsFromDRSecondaryNextWithHttpMessagesAsync(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, "ListSnapshotsFromDRSecondaryNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobsNextWithHttpMessagesAsync(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, "ListTriggeredWebJobsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// 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>> ListTriggeredWebJobHistoryNextWithHttpMessagesAsync(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, "ListTriggeredWebJobHistoryNext", 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 && (int)_statusCode != 404) - { - var ex = new DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _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 quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// 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>> ListUsagesNextWithHttpMessagesAsync(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, "ListUsagesNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// 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>> ListWebJobsNextWithHttpMessagesAsync(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, "ListWebJobsNext", 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs deleted file mode 100644 index 75e29edff31a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebAppsOperationsExtensions.cs +++ /dev/null @@ -1,26790 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.IO; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for WebAppsOperations. - /// - public static partial class WebAppsOperationsExtensions - { - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - public static IPage List(this IWebAppsOperations operations) - { - return operations.ListAsync().GetAwaiter().GetResult(); - } - - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IWebAppsOperations operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Specify <strong>true</strong> to include deployment slots in - /// results. The default is false, which only gives you the production slot of - /// all apps. - /// - public static IPage ListByResourceGroup(this IWebAppsOperations operations, string resourceGroupName, bool? includeSlots = default(bool?)) - { - return operations.ListByResourceGroupAsync(resourceGroupName, includeSlots).GetAwaiter().GetResult(); - } - - /// - /// Gets all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Specify <strong>true</strong> to include deployment slots in - /// results. The default is false, which only gives you the production slot of - /// all apps. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupAsync(this IWebAppsOperations operations, string resourceGroupName, bool? includeSlots = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupWithHttpMessagesAsync(resourceGroupName, includeSlots, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static Site Get(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - public static Site CreateOrUpdate(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope) - { - return operations.CreateOrUpdateAsync(resourceGroupName, name, siteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - public static void Delete(this IWebAppsOperations operations, string resourceGroupName, string name, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?)) - { - operations.DeleteAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm).GetAwaiter().GetResult(); - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IWebAppsOperations operations, string resourceGroupName, string name, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - public static Site Update(this IWebAppsOperations operations, string resourceGroupName, string name, SitePatchResource siteEnvelope) - { - return operations.UpdateAsync(resourceGroupName, name, siteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SitePatchResource siteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Custom hostname. - /// - public static CustomHostnameAnalysisResult AnalyzeCustomHostname(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName = default(string)) - { - return operations.AnalyzeCustomHostnameAsync(resourceGroupName, name, hostName).GetAwaiter().GetResult(); - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Custom hostname. - /// - /// - /// The cancellation token. - /// - public static async Task AnalyzeCustomHostnameAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AnalyzeCustomHostnameWithHttpMessagesAsync(resourceGroupName, name, hostName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - public static void ApplySlotConfigToProduction(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity) - { - operations.ApplySlotConfigToProductionAsync(resourceGroupName, name, slotSwapEntity).GetAwaiter().GetResult(); - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The cancellation token. - /// - public static async Task ApplySlotConfigToProductionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ApplySlotConfigToProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - public static BackupItem Backup(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request) - { - return operations.BackupAsync(resourceGroupName, name, request).GetAwaiter().GetResult(); - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - /// - /// The cancellation token. - /// - public static async Task BackupAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BackupWithHttpMessagesAsync(resourceGroupName, name, request, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListBackups(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListBackupsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBackupsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - public static BackupItem GetBackupStatus(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId) - { - return operations.GetBackupStatusAsync(resourceGroupName, name, backupId).GetAwaiter().GetResult(); - } - - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// The cancellation token. - /// - public static async Task GetBackupStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBackupStatusWithHttpMessagesAsync(resourceGroupName, name, backupId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - public static void DeleteBackup(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId) - { - operations.DeleteBackupAsync(resourceGroupName, name, backupId).GetAwaiter().GetResult(); - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteBackupAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteBackupWithHttpMessagesAsync(resourceGroupName, name, backupId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - public static BackupItem ListBackupStatusSecrets(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, BackupRequest request) - { - return operations.ListBackupStatusSecretsAsync(resourceGroupName, name, backupId, request).GetAwaiter().GetResult(); - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// The cancellation token. - /// - public static async Task ListBackupStatusSecretsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, BackupRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupStatusSecretsWithHttpMessagesAsync(resourceGroupName, name, backupId, request, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - public static void Restore(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request) - { - operations.RestoreAsync(resourceGroupName, name, backupId, request).GetAwaiter().GetResult(); - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// The cancellation token. - /// - public static async Task RestoreAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreWithHttpMessagesAsync(resourceGroupName, name, backupId, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListBasicPublishingCredentialsPolicies(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListBasicPublishingCredentialsPoliciesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBasicPublishingCredentialsPoliciesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBasicPublishingCredentialsPoliciesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static CsmPublishingCredentialsPoliciesEntity GetFtpAllowed(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetFtpAllowedAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetFtpAllowedAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFtpAllowedWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity UpdateFtpAllowed(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity) - { - return operations.UpdateFtpAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).GetAwaiter().GetResult(); - } - - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateFtpAllowedAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateFtpAllowedWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static CsmPublishingCredentialsPoliciesEntity GetScmAllowed(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetScmAllowedAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetScmAllowedAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetScmAllowedWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity UpdateScmAllowed(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity) - { - return operations.UpdateScmAllowedAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity).GetAwaiter().GetResult(); - } - - /// - /// Updates whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateScmAllowedAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateScmAllowedWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListConfigurations(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListConfigurationsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - public static StringDictionary UpdateApplicationSettings(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary appSettings) - { - return operations.UpdateApplicationSettingsAsync(resourceGroupName, name, appSettings).GetAwaiter().GetResult(); - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateApplicationSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary appSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateApplicationSettingsWithHttpMessagesAsync(resourceGroupName, name, appSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static StringDictionary ListApplicationSettings(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListApplicationSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListApplicationSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListApplicationSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - public static SiteAuthSettings UpdateAuthSettings(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettings siteAuthSettings) - { - return operations.UpdateAuthSettingsAsync(resourceGroupName, name, siteAuthSettings).GetAwaiter().GetResult(); - } - - /// - /// Updates the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAuthSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAuthSettingsWithHttpMessagesAsync(resourceGroupName, name, siteAuthSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteAuthSettings GetAuthSettings(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAuthSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteAuthSettingsV2 GetAuthSettingsV2WithoutSecrets(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAuthSettingsV2WithoutSecretsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsV2WithoutSecretsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsV2WithoutSecretsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - public static SiteAuthSettingsV2 UpdateAuthSettingsV2(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2) - { - return operations.UpdateAuthSettingsV2Async(resourceGroupName, name, siteAuthSettingsV2).GetAwaiter().GetResult(); - } - - /// - /// Updates site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAuthSettingsV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAuthSettingsV2WithHttpMessagesAsync(resourceGroupName, name, siteAuthSettingsV2, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteAuthSettingsV2 GetAuthSettingsV2(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAuthSettingsV2Async(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsV2WithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - public static AzureStoragePropertyDictionaryResource UpdateAzureStorageAccounts(this IWebAppsOperations operations, string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts) - { - return operations.UpdateAzureStorageAccountsAsync(resourceGroupName, name, azureStorageAccounts).GetAwaiter().GetResult(); - } - - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAzureStorageAccountsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAzureStorageAccountsWithHttpMessagesAsync(resourceGroupName, name, azureStorageAccounts, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static AzureStoragePropertyDictionaryResource ListAzureStorageAccounts(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListAzureStorageAccountsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListAzureStorageAccountsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAzureStorageAccountsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - public static BackupRequest UpdateBackupConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request) - { - return operations.UpdateBackupConfigurationAsync(resourceGroupName, name, request).GetAwaiter().GetResult(); - } - - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateBackupConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateBackupConfigurationWithHttpMessagesAsync(resourceGroupName, name, request, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void DeleteBackupConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.DeleteBackupConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteBackupConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteBackupConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static BackupRequest GetBackupConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetBackupConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetBackupConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBackupConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage GetAppSettingsKeyVaultReferences(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetAppSettingsKeyVaultReferencesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAppSettingsKeyVaultReferencesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingsKeyVaultReferencesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - public static ApiKVReference GetAppSettingKeyVaultReference(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey) - { - return operations.GetAppSettingKeyVaultReferenceAsync(resourceGroupName, name, appSettingKey).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// The cancellation token. - /// - public static async Task GetAppSettingKeyVaultReferenceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingKeyVaultReferenceWithHttpMessagesAsync(resourceGroupName, name, appSettingKey, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage GetSiteConnectionStringKeyVaultReferences(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetSiteConnectionStringKeyVaultReferencesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> GetSiteConnectionStringKeyVaultReferencesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static ApiKVReference GetSiteConnectionStringKeyVaultReference(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey) - { - return operations.GetSiteConnectionStringKeyVaultReferenceAsync(resourceGroupName, name, connectionStringKey).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteConnectionStringKeyVaultReferenceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferenceWithHttpMessagesAsync(resourceGroupName, name, connectionStringKey, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - public static ConnectionStringDictionary UpdateConnectionStrings(this IWebAppsOperations operations, string resourceGroupName, string name, ConnectionStringDictionary connectionStrings) - { - return operations.UpdateConnectionStringsAsync(resourceGroupName, name, connectionStrings).GetAwaiter().GetResult(); - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateConnectionStringsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateConnectionStringsWithHttpMessagesAsync(resourceGroupName, name, connectionStrings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static ConnectionStringDictionary ListConnectionStrings(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListConnectionStringsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListConnectionStringsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConnectionStringsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteLogsConfig GetDiagnosticLogsConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetDiagnosticLogsConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetDiagnosticLogsConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDiagnosticLogsConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// - public static SiteLogsConfig UpdateDiagnosticLogsConfig(this IWebAppsOperations operations, string resourceGroupName, string name, SiteLogsConfig siteLogsConfig) - { - return operations.UpdateDiagnosticLogsConfigAsync(resourceGroupName, name, siteLogsConfig).GetAwaiter().GetResult(); - } - - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateDiagnosticLogsConfigAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateDiagnosticLogsConfigWithHttpMessagesAsync(resourceGroupName, name, siteLogsConfig, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - public static StringDictionary UpdateMetadata(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary metadata) - { - return operations.UpdateMetadataAsync(resourceGroupName, name, metadata).GetAwaiter().GetResult(); - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateMetadataAsync(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary metadata, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateMetadataWithHttpMessagesAsync(resourceGroupName, name, metadata, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static StringDictionary ListMetadata(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListMetadataAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListMetadataAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMetadataWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static User ListPublishingCredentials(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListPublishingCredentialsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListPublishingCredentialsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublishingCredentialsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - public static PushSettings UpdateSitePushSettings(this IWebAppsOperations operations, string resourceGroupName, string name, PushSettings pushSettings) - { - return operations.UpdateSitePushSettingsAsync(resourceGroupName, name, pushSettings).GetAwaiter().GetResult(); - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSitePushSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PushSettings pushSettings, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSitePushSettingsWithHttpMessagesAsync(resourceGroupName, name, pushSettings, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static PushSettings ListSitePushSettings(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSitePushSettingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task ListSitePushSettingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSitePushSettingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the names of app settings and connection strings that stick to the - /// slot (not swapped). - /// - /// - /// Description for Gets the names of app settings and connection strings that - /// stick to the slot (not swapped). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SlotConfigNamesResource ListSlotConfigurationNames(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSlotConfigurationNamesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the names of app settings and connection strings that stick to the - /// slot (not swapped). - /// - /// - /// Description for Gets the names of app settings and connection strings that - /// stick to the slot (not swapped). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListSlotConfigurationNamesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotConfigurationNamesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the names of application settings and connection string that remain - /// with the slot during swap operation. - /// - /// - /// Description for Updates the names of application settings and connection - /// string that remain with the slot during swap operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Names of application settings and connection strings. See example. - /// - public static SlotConfigNamesResource UpdateSlotConfigurationNames(this IWebAppsOperations operations, string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames) - { - return operations.UpdateSlotConfigurationNamesAsync(resourceGroupName, name, slotConfigNames).GetAwaiter().GetResult(); - } - - /// - /// Updates the names of application settings and connection string that remain - /// with the slot during swap operation. - /// - /// - /// Description for Updates the names of application settings and connection - /// string that remain with the slot during swap operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Names of application settings and connection strings. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSlotConfigurationNamesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SlotConfigNamesResource slotConfigNames, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSlotConfigurationNamesWithHttpMessagesAsync(resourceGroupName, name, slotConfigNames, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteConfigResource GetConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetConfigurationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetConfigurationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - public static SiteConfigResource CreateOrUpdateConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig) - { - return operations.CreateOrUpdateConfigurationAsync(resourceGroupName, name, siteConfig).GetAwaiter().GetResult(); - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateConfigurationWithHttpMessagesAsync(resourceGroupName, name, siteConfig, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - public static SiteConfigResource UpdateConfiguration(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig) - { - return operations.UpdateConfigurationAsync(resourceGroupName, name, siteConfig).GetAwaiter().GetResult(); - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateConfigurationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateConfigurationWithHttpMessagesAsync(resourceGroupName, name, siteConfig, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListConfigurationSnapshotInfo(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListConfigurationSnapshotInfoAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationSnapshotInfoAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationSnapshotInfoWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - public static SiteConfigResource GetConfigurationSnapshot(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId) - { - return operations.GetConfigurationSnapshotAsync(resourceGroupName, name, snapshotId).GetAwaiter().GetResult(); - } - - /// - /// Gets a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// The cancellation token. - /// - public static async Task GetConfigurationSnapshotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetConfigurationSnapshotWithHttpMessagesAsync(resourceGroupName, name, snapshotId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - public static void RecoverSiteConfigurationSnapshot(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId) - { - operations.RecoverSiteConfigurationSnapshotAsync(resourceGroupName, name, snapshotId).GetAwaiter().GetResult(); - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// The cancellation token. - /// - public static async Task RecoverSiteConfigurationSnapshotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RecoverSiteConfigurationSnapshotWithHttpMessagesAsync(resourceGroupName, name, snapshotId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static Stream GetWebSiteContainerLogs(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetWebSiteContainerLogsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetWebSiteContainerLogsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetWebSiteContainerLogsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static Stream GetContainerLogsZip(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetContainerLogsZipAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetContainerLogsZipAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetContainerLogsZipWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListContinuousWebJobs(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListContinuousWebJobsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListContinuousWebJobsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListContinuousWebJobsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static ContinuousWebJob GetContinuousWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - return operations.GetContinuousWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task GetContinuousWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetContinuousWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static void DeleteContinuousWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - operations.DeleteContinuousWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteContinuousWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteContinuousWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static void StartContinuousWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - operations.StartContinuousWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task StartContinuousWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StartContinuousWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static void StopContinuousWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - operations.StopContinuousWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task StopContinuousWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopContinuousWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListDeployments(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListDeploymentsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDeploymentsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - public static Deployment GetDeployment(this IWebAppsOperations operations, string resourceGroupName, string name, string id) - { - return operations.GetDeploymentAsync(resourceGroupName, name, id).GetAwaiter().GetResult(); - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// The cancellation token. - /// - public static async Task GetDeploymentAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDeploymentWithHttpMessagesAsync(resourceGroupName, name, id, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Deployment details. - /// - public static Deployment CreateDeployment(this IWebAppsOperations operations, string resourceGroupName, string name, string id, Deployment deployment) - { - return operations.CreateDeploymentAsync(resourceGroupName, name, id, deployment).GetAwaiter().GetResult(); - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Deployment details. - /// - /// - /// The cancellation token. - /// - public static async Task CreateDeploymentAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, Deployment deployment, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateDeploymentWithHttpMessagesAsync(resourceGroupName, name, id, deployment, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - public static void DeleteDeployment(this IWebAppsOperations operations, string resourceGroupName, string name, string id) - { - operations.DeleteDeploymentAsync(resourceGroupName, name, id).GetAwaiter().GetResult(); - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteDeploymentAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteDeploymentWithHttpMessagesAsync(resourceGroupName, name, id, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - public static Deployment ListDeploymentLog(this IWebAppsOperations operations, string resourceGroupName, string name, string id) - { - return operations.ListDeploymentLogAsync(resourceGroupName, name, id).GetAwaiter().GetResult(); - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - /// - /// The cancellation token. - /// - public static async Task ListDeploymentLogAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentLogWithHttpMessagesAsync(resourceGroupName, name, id, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - public static RestoreRequest DiscoverBackup(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request) - { - return operations.DiscoverBackupAsync(resourceGroupName, name, request).GetAwaiter().GetResult(); - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - /// - /// The cancellation token. - /// - public static async Task DiscoverBackupAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DiscoverBackupWithHttpMessagesAsync(resourceGroupName, name, request, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListDomainOwnershipIdentifiers(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListDomainOwnershipIdentifiersAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDomainOwnershipIdentifiersAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDomainOwnershipIdentifiersWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - public static Identifier GetDomainOwnershipIdentifier(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName) - { - return operations.GetDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName).GetAwaiter().GetResult(); - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// The cancellation token. - /// - public static async Task GetDomainOwnershipIdentifierAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDomainOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - public static Identifier CreateOrUpdateDomainOwnershipIdentifier(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier) - { - return operations.CreateOrUpdateDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).GetAwaiter().GetResult(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateDomainOwnershipIdentifierAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateDomainOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - public static void DeleteDomainOwnershipIdentifier(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName) - { - operations.DeleteDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteDomainOwnershipIdentifierAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteDomainOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - public static Identifier UpdateDomainOwnershipIdentifier(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier) - { - return operations.UpdateDomainOwnershipIdentifierAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier).GetAwaiter().GetResult(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateDomainOwnershipIdentifierAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateDomainOwnershipIdentifierWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static MSDeployStatus GetMSDeployStatus(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetMSDeployStatusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetMSDeployStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMSDeployStatusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus CreateMSDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name, MSDeploy mSDeploy) - { - return operations.CreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task CreateMSDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static MSDeployLog GetMSDeployLog(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetMSDeployLogAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetMSDeployLogAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMSDeployLogWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke onedeploy status API /api/deployments and gets the deployment status - /// for the site - /// - /// - /// Description for Invoke onedeploy status API /api/deployments and gets the - /// deployment status for the site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static object GetOneDeployStatus(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetOneDeployStatusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Invoke onedeploy status API /api/deployments and gets the deployment status - /// for the site - /// - /// - /// Description for Invoke onedeploy status API /api/deployments and gets the - /// deployment status for the site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetOneDeployStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetOneDeployStatusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the OneDeploy publish web app extension. - /// - /// - /// Description for Invoke the OneDeploy publish web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static object CreateOneDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.CreateOneDeployOperationAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Invoke the OneDeploy publish web app extension. - /// - /// - /// Description for Invoke the OneDeploy publish web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOneDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOneDeployOperationWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListFunctions(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListFunctionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListFunctionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static string GetFunctionsAdminToken(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetFunctionsAdminTokenAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetFunctionsAdminTokenAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionsAdminTokenWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - public static FunctionEnvelope GetFunction(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName) - { - return operations.GetFunctionAsync(resourceGroupName, name, functionName).GetAwaiter().GetResult(); - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The cancellation token. - /// - public static async Task GetFunctionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - public static FunctionEnvelope CreateFunction(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope) - { - return operations.CreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// The cancellation token. - /// - public static async Task CreateFunctionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, functionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - public static void DeleteFunction(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName) - { - operations.DeleteFunctionAsync(resourceGroupName, name, functionName).GetAwaiter().GetResult(); - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteFunctionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or update - /// - public static KeyInfo CreateOrUpdateFunctionSecret(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, KeyInfo key) - { - return operations.CreateOrUpdateFunctionSecretAsync(resourceGroupName, name, functionName, keyName, key).GetAwaiter().GetResult(); - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or update - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateFunctionSecretAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, KeyInfo key, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateFunctionSecretWithHttpMessagesAsync(resourceGroupName, name, functionName, keyName, key, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - public static void DeleteFunctionSecret(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName) - { - operations.DeleteFunctionSecretAsync(resourceGroupName, name, functionName, keyName).GetAwaiter().GetResult(); - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteFunctionSecretAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteFunctionSecretWithHttpMessagesAsync(resourceGroupName, name, functionName, keyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - public static StringDictionary ListFunctionKeys(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName) - { - return operations.ListFunctionKeysAsync(resourceGroupName, name, functionName).GetAwaiter().GetResult(); - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The cancellation token. - /// - public static async Task ListFunctionKeysAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionKeysWithHttpMessagesAsync(resourceGroupName, name, functionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - public static FunctionSecrets ListFunctionSecrets(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName) - { - return operations.ListFunctionSecretsAsync(resourceGroupName, name, functionName).GetAwaiter().GetResult(); - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// The cancellation token. - /// - public static async Task ListFunctionSecretsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionSecretsWithHttpMessagesAsync(resourceGroupName, name, functionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static HostKeys ListHostKeys(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListHostKeysAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task ListHostKeysAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostKeysWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void ListSyncStatus(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.ListSyncStatusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListSyncStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ListSyncStatusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void SyncFunctions(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.SyncFunctionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task SyncFunctionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncFunctionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or update - /// - public static KeyInfo CreateOrUpdateHostSecret(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, KeyInfo key) - { - return operations.CreateOrUpdateHostSecretAsync(resourceGroupName, name, keyType, keyName, key).GetAwaiter().GetResult(); - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The key to create or update - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHostSecretAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, KeyInfo key, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHostSecretWithHttpMessagesAsync(resourceGroupName, name, keyType, keyName, key, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - public static void DeleteHostSecret(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName) - { - operations.DeleteHostSecretAsync(resourceGroupName, name, keyType, keyName).GetAwaiter().GetResult(); - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHostSecretAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHostSecretWithHttpMessagesAsync(resourceGroupName, name, keyType, keyName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListHostNameBindings(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListHostNameBindingsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostNameBindingsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostNameBindingsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - public static HostNameBinding GetHostNameBinding(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName) - { - return operations.GetHostNameBindingAsync(resourceGroupName, name, hostName).GetAwaiter().GetResult(); - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// The cancellation token. - /// - public static async Task GetHostNameBindingAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHostNameBindingWithHttpMessagesAsync(resourceGroupName, name, hostName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - public static HostNameBinding CreateOrUpdateHostNameBinding(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding) - { - return operations.CreateOrUpdateHostNameBindingAsync(resourceGroupName, name, hostName, hostNameBinding).GetAwaiter().GetResult(); - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHostNameBindingAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHostNameBindingWithHttpMessagesAsync(resourceGroupName, name, hostName, hostNameBinding, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - public static void DeleteHostNameBinding(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName) - { - operations.DeleteHostNameBindingAsync(resourceGroupName, name, hostName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHostNameBindingAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHostNameBindingWithHttpMessagesAsync(resourceGroupName, name, hostName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - public static HybridConnection GetHybridConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - return operations.GetHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetHybridConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - public static HybridConnection CreateOrUpdateHybridConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope) - { - return operations.CreateOrUpdateHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHybridConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - public static void DeleteHybridConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName) - { - operations.DeleteHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName).GetAwaiter().GetResult(); - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHybridConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - public static HybridConnection UpdateHybridConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope) - { - return operations.UpdateHybridConnectionAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateHybridConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateHybridConnectionWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - public static HybridConnection ListHybridConnections(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListHybridConnectionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The cancellation token. - /// - public static async Task ListHybridConnectionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHybridConnectionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static RelayServiceConnectionEntity ListRelayServiceConnections(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListRelayServiceConnectionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListRelayServiceConnectionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRelayServiceConnectionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - public static RelayServiceConnectionEntity GetRelayServiceConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName) - { - return operations.GetRelayServiceConnectionAsync(resourceGroupName, name, entityName).GetAwaiter().GetResult(); - } - - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetRelayServiceConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRelayServiceConnectionWithHttpMessagesAsync(resourceGroupName, name, entityName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - public static RelayServiceConnectionEntity CreateOrUpdateRelayServiceConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope) - { - return operations.CreateOrUpdateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateRelayServiceConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateRelayServiceConnectionWithHttpMessagesAsync(resourceGroupName, name, entityName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - public static void DeleteRelayServiceConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName) - { - operations.DeleteRelayServiceConnectionAsync(resourceGroupName, name, entityName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteRelayServiceConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteRelayServiceConnectionWithHttpMessagesAsync(resourceGroupName, name, entityName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - public static RelayServiceConnectionEntity UpdateRelayServiceConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope) - { - return operations.UpdateRelayServiceConnectionAsync(resourceGroupName, name, entityName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateRelayServiceConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateRelayServiceConnectionWithHttpMessagesAsync(resourceGroupName, name, entityName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListInstanceIdentifiers(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListInstanceIdentifiersAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceIdentifiersAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceIdentifiersWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static WebSiteInstanceStatus GetInstanceInfo(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId) - { - return operations.GetInstanceInfoAsync(resourceGroupName, name, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceInfoAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceInfoWithHttpMessagesAsync(resourceGroupName, name, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - public static MSDeployStatus GetInstanceMsDeployStatus(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId) - { - return operations.GetInstanceMsDeployStatusAsync(resourceGroupName, name, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceMsDeployStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceMsDeployStatusWithHttpMessagesAsync(resourceGroupName, name, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus CreateInstanceMSDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy) - { - return operations.CreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task CreateInstanceMSDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateInstanceMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, instanceId, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - public static MSDeployLog GetInstanceMSDeployLog(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId) - { - return operations.GetInstanceMSDeployLogAsync(resourceGroupName, name, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceMSDeployLogAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceMSDeployLogWithHttpMessagesAsync(resourceGroupName, name, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcesses(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId) - { - return operations.ListInstanceProcessesAsync(resourceGroupName, name, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessesWithHttpMessagesAsync(resourceGroupName, name, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static ProcessInfo GetInstanceProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId) - { - return operations.GetInstanceProcessAsync(resourceGroupName, name, processId, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceProcessWithHttpMessagesAsync(resourceGroupName, name, processId, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static void DeleteInstanceProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId) - { - operations.DeleteInstanceProcessAsync(resourceGroupName, name, processId, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task DeleteInstanceProcessAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteInstanceProcessWithHttpMessagesAsync(resourceGroupName, name, processId, instanceId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static Stream GetInstanceProcessDump(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId) - { - return operations.GetInstanceProcessDumpAsync(resourceGroupName, name, processId, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessDumpAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetInstanceProcessDumpWithHttpMessagesAsync(resourceGroupName, name, processId, instanceId, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcessModules(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId) - { - return operations.ListInstanceProcessModulesAsync(resourceGroupName, name, processId, instanceId).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessModulesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessModulesWithHttpMessagesAsync(resourceGroupName, name, processId, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static ProcessModuleInfo GetInstanceProcessModule(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string instanceId) - { - return operations.GetInstanceProcessModuleAsync(resourceGroupName, name, processId, baseAddress, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessModuleAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceProcessModuleWithHttpMessagesAsync(resourceGroupName, name, processId, baseAddress, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcessThreads(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId) - { - return operations.ListInstanceProcessThreadsAsync(resourceGroupName, name, processId, instanceId).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessThreadsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessThreadsWithHttpMessagesAsync(resourceGroupName, name, processId, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteCloneability IsCloneable(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.IsCloneableAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task IsCloneableAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.IsCloneableWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListSiteBackups(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSiteBackupsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteBackupsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteBackupsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static FunctionSecrets ListSyncFunctionTriggers(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSyncFunctionTriggersAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListSyncFunctionTriggersAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSyncFunctionTriggersWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - public static StorageMigrationResponse MigrateStorage(this IWebAppsOperations operations, string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions) - { - return operations.MigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// The cancellation token. - /// - public static async Task MigrateStorageAsync(this IWebAppsOperations operations, string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.MigrateStorageWithHttpMessagesAsync(subscriptionName, resourceGroupName, name, migrationOptions, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - public static Operation MigrateMySql(this IWebAppsOperations operations, string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope) - { - return operations.MigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// The cancellation token. - /// - public static async Task MigrateMySqlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.MigrateMySqlWithHttpMessagesAsync(resourceGroupName, name, migrationRequestEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static MigrateMySqlStatus GetMigrateMySqlStatus(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetMigrateMySqlStatusAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetMigrateMySqlStatusAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMigrateMySqlStatusWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SwiftVirtualNetwork GetSwiftVirtualNetworkConnection(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetSwiftVirtualNetworkConnectionAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetSwiftVirtualNetworkConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSwiftVirtualNetworkConnectionWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnectionWithCheck(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) - { - return operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void DeleteSwiftVirtualNetwork(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.DeleteSwiftVirtualNetworkAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSwiftVirtualNetworkAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSwiftVirtualNetworkWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionWithCheck(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope) - { - return operations.UpdateSwiftVirtualNetworkConnectionWithCheckAsync(resourceGroupName, name, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSwiftVirtualNetworkConnectionWithCheckAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionWithCheckWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - public static NetworkFeatures ListNetworkFeatures(this IWebAppsOperations operations, string resourceGroupName, string name, string view) - { - return operations.ListNetworkFeaturesAsync(resourceGroupName, name, view).GetAwaiter().GetResult(); - } - - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// The cancellation token. - /// - public static async Task ListNetworkFeaturesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string view, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNetworkFeaturesWithHttpMessagesAsync(resourceGroupName, name, view, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - public static IList GetNetworkTraceOperation(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId) - { - return operations.GetNetworkTraceOperationAsync(resourceGroupName, name, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTraceOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static string StartWebSiteNetworkTrace(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartWebSiteNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task StartWebSiteNetworkTraceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartWebSiteNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList StartWebSiteNetworkTraceOperation(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartWebSiteNetworkTraceOperationAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> StartWebSiteNetworkTraceOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartWebSiteNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - public static void StopWebSiteNetworkTrace(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.StopWebSiteNetworkTraceAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The cancellation token. - /// - public static async Task StopWebSiteNetworkTraceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopWebSiteNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - public static IList GetNetworkTraces(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId) - { - return operations.GetNetworkTracesAsync(resourceGroupName, name, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTracesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTracesWithHttpMessagesAsync(resourceGroupName, name, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - public static IList GetNetworkTraceOperationV2(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId) - { - return operations.GetNetworkTraceOperationV2Async(resourceGroupName, name, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTraceOperationV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTraceOperationV2WithHttpMessagesAsync(resourceGroupName, name, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - public static IList GetNetworkTracesV2(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId) - { - return operations.GetNetworkTracesV2Async(resourceGroupName, name, operationId).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTracesV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTracesV2WithHttpMessagesAsync(resourceGroupName, name, operationId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void GenerateNewSitePublishingPassword(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.GenerateNewSitePublishingPasswordAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GenerateNewSitePublishingPasswordAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GenerateNewSitePublishingPasswordWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - public static IPage ListPerfMonCounters(this IWebAppsOperations operations, string resourceGroupName, string name, string filter = default(string)) - { - return operations.ListPerfMonCountersAsync(resourceGroupName, name, filter).GetAwaiter().GetResult(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPerfMonCountersAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPerfMonCountersWithHttpMessagesAsync(resourceGroupName, name, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static SitePhpErrorLogFlag GetSitePhpErrorLogFlag(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetSitePhpErrorLogFlagAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetSitePhpErrorLogFlagAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSitePhpErrorLogFlagWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static PremierAddOn ListPremierAddOns(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListPremierAddOnsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ListPremierAddOnsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPremierAddOnsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - public static PremierAddOn GetPremierAddOn(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName) - { - return operations.GetPremierAddOnAsync(resourceGroupName, name, premierAddOnName).GetAwaiter().GetResult(); - } - - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// The cancellation token. - /// - public static async Task GetPremierAddOnAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPremierAddOnWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - public static PremierAddOn AddPremierAddOn(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn) - { - return operations.AddPremierAddOnAsync(resourceGroupName, name, premierAddOnName, premierAddOn).GetAwaiter().GetResult(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// The cancellation token. - /// - public static async Task AddPremierAddOnAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AddPremierAddOnWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, premierAddOn, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - public static void DeletePremierAddOn(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName) - { - operations.DeletePremierAddOnAsync(resourceGroupName, name, premierAddOnName).GetAwaiter().GetResult(); - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// The cancellation token. - /// - public static async Task DeletePremierAddOnAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeletePremierAddOnWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - public static PremierAddOn UpdatePremierAddOn(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn) - { - return operations.UpdatePremierAddOnAsync(resourceGroupName, name, premierAddOnName, premierAddOn).GetAwaiter().GetResult(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// The cancellation token. - /// - public static async Task UpdatePremierAddOnAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdatePremierAddOnWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, premierAddOn, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - public static PrivateAccess GetPrivateAccess(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateAccessAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateAccessAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateAccessWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - public static PrivateAccess PutPrivateAccessVnet(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access) - { - return operations.PutPrivateAccessVnetAsync(resourceGroupName, name, access).GetAwaiter().GetResult(); - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// The cancellation token. - /// - public static async Task PutPrivateAccessVnetAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutPrivateAccessVnetWithHttpMessagesAsync(resourceGroupName, name, access, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - public static IPage GetPrivateEndpointConnectionList(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateEndpointConnectionListAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.GetPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.ApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task ApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - public static object DeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.DeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - public static PrivateLinkResourcesWrapper GetPrivateLinkResources(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetPrivateLinkResourcesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateLinkResourcesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateLinkResourcesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListProcesses(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListProcessesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - public static ProcessInfo GetProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) - { - return operations.GetProcessAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetProcessWithHttpMessagesAsync(resourceGroupName, name, processId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - public static void DeleteProcess(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) - { - operations.DeleteProcessAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteProcessAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteProcessWithHttpMessagesAsync(resourceGroupName, name, processId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - public static Stream GetProcessDump(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) - { - return operations.GetProcessDumpAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessDumpAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetProcessDumpWithHttpMessagesAsync(resourceGroupName, name, processId, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - public static IPage ListProcessModules(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) - { - return operations.ListProcessModulesAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessModulesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessModulesWithHttpMessagesAsync(resourceGroupName, name, processId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - public static ProcessModuleInfo GetProcessModule(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress) - { - return operations.GetProcessModuleAsync(resourceGroupName, name, processId, baseAddress).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessModuleAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetProcessModuleWithHttpMessagesAsync(resourceGroupName, name, processId, baseAddress, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - public static IPage ListProcessThreads(this IWebAppsOperations operations, string resourceGroupName, string name, string processId) - { - return operations.ListProcessThreadsAsync(resourceGroupName, name, processId).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessThreadsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessThreadsWithHttpMessagesAsync(resourceGroupName, name, processId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListPublicCertificates(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListPublicCertificatesAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPublicCertificatesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublicCertificatesWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - public static PublicCertificate GetPublicCertificate(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName) - { - return operations.GetPublicCertificateAsync(resourceGroupName, name, publicCertificateName).GetAwaiter().GetResult(); - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// The cancellation token. - /// - public static async Task GetPublicCertificateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPublicCertificateWithHttpMessagesAsync(resourceGroupName, name, publicCertificateName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - public static PublicCertificate CreateOrUpdatePublicCertificate(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate) - { - return operations.CreateOrUpdatePublicCertificateAsync(resourceGroupName, name, publicCertificateName, publicCertificate).GetAwaiter().GetResult(); - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdatePublicCertificateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdatePublicCertificateWithHttpMessagesAsync(resourceGroupName, name, publicCertificateName, publicCertificate, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - public static void DeletePublicCertificate(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName) - { - operations.DeletePublicCertificateAsync(resourceGroupName, name, publicCertificateName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// The cancellation token. - /// - public static async Task DeletePublicCertificateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeletePublicCertificateWithHttpMessagesAsync(resourceGroupName, name, publicCertificateName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - public static Stream ListPublishingProfileXmlWithSecrets(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions) - { - return operations.ListPublishingProfileXmlWithSecretsAsync(resourceGroupName, name, publishingProfileOptions).GetAwaiter().GetResult(); - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - /// - /// The cancellation token. - /// - public static async Task ListPublishingProfileXmlWithSecretsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.ListPublishingProfileXmlWithSecretsWithHttpMessagesAsync(resourceGroupName, name, publishingProfileOptions, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void ResetProductionSlotConfig(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.ResetProductionSlotConfigAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task ResetProductionSlotConfigAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetProductionSlotConfigWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - public static void Restart(this IWebAppsOperations operations, string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?)) - { - operations.RestartAsync(resourceGroupName, name, softRestart, synchronous).GetAwaiter().GetResult(); - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - /// - /// The cancellation token. - /// - public static async Task RestartAsync(this IWebAppsOperations operations, string resourceGroupName, string name, bool? softRestart = default(bool?), bool? synchronous = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestartWithHttpMessagesAsync(resourceGroupName, name, softRestart, synchronous, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - public static void RestoreFromBackupBlob(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request) - { - operations.RestoreFromBackupBlobAsync(resourceGroupName, name, request).GetAwaiter().GetResult(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// The cancellation token. - /// - public static async Task RestoreFromBackupBlobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreFromBackupBlobWithHttpMessagesAsync(resourceGroupName, name, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - public static void RestoreFromDeletedApp(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest) - { - operations.RestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).GetAwaiter().GetResult(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreFromDeletedAppAsync(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreFromDeletedAppWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - public static void RestoreSnapshot(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest) - { - operations.RestoreSnapshotAsync(resourceGroupName, name, restoreRequest).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreSnapshotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreSnapshotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListSiteExtensions(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSiteExtensionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteExtensionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteExtensionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - public static SiteExtensionInfo GetSiteExtension(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId) - { - return operations.GetSiteExtensionAsync(resourceGroupName, name, siteExtensionId).GetAwaiter().GetResult(); - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteExtensionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - public static SiteExtensionInfo InstallSiteExtension(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId) - { - return operations.InstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId).GetAwaiter().GetResult(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The cancellation token. - /// - public static async Task InstallSiteExtensionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.InstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - public static void DeleteSiteExtension(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId) - { - operations.DeleteSiteExtensionAsync(resourceGroupName, name, siteExtensionId).GetAwaiter().GetResult(); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSiteExtensionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IPage ListSlots(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSlotsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns the production - /// slot. - /// - public static Site GetSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the details of a web, mobile, or API app. - /// - /// - /// Description for Gets the details of a web, mobile, or API app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns the production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - public static Site CreateOrUpdateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, string slot) - { - return operations.CreateOrUpdateSlotAsync(resourceGroupName, name, siteEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// Name of the deployment slot to delete. By default, the API deletes the - /// production slot. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - public static void DeleteSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?)) - { - operations.DeleteSlotAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm).GetAwaiter().GetResult(); - } - - /// - /// Deletes a web, mobile, or API app, or one of the deployment slots. - /// - /// - /// Description for Deletes a web, mobile, or API app, or one of the deployment - /// slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app to delete. - /// - /// - /// Name of the deployment slot to delete. By default, the API deletes the - /// production slot. - /// - /// - /// If true, web app metrics are also deleted. - /// - /// - /// Specify false if you want to keep empty App Service plan. By default, empty - /// App Service plan is deleted. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, bool? deleteMetrics = default(bool?), bool? deleteEmptyServerFarm = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSlotWithHttpMessagesAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - public static Site UpdateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot) - { - return operations.UpdateSlotAsync(resourceGroupName, name, siteEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SitePatchResource siteEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Custom hostname. - /// - public static CustomHostnameAnalysisResult AnalyzeCustomHostnameSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName = default(string)) - { - return operations.AnalyzeCustomHostnameSlotAsync(resourceGroupName, name, slot, hostName).GetAwaiter().GetResult(); - } - - /// - /// Analyze a custom hostname. - /// - /// - /// Description for Analyze a custom hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Custom hostname. - /// - /// - /// The cancellation token. - /// - public static async Task AnalyzeCustomHostnameSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AnalyzeCustomHostnameSlotWithHttpMessagesAsync(resourceGroupName, name, slot, hostName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static void ApplySlotConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot) - { - operations.ApplySlotConfigurationSlotAsync(resourceGroupName, name, slotSwapEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Applies the configuration settings from the target slot onto the current - /// slot. - /// - /// - /// Description for Applies the configuration settings from the target slot - /// onto the current slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task ApplySlotConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ApplySlotConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a backup for the production slot. - /// - public static BackupItem BackupSlot(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot) - { - return operations.BackupSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a backup of an app. - /// - /// - /// Description for Creates a backup of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Backup configuration. You can use the JSON response from the POST action as - /// input here. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a backup for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BackupSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BackupSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - public static IPage ListBackupsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListBackupsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBackupsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// backup of the production slot. - /// - public static BackupItem GetBackupStatusSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, string slot) - { - return operations.GetBackupStatusSlotAsync(resourceGroupName, name, backupId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a backup of an app by its ID. - /// - /// - /// Description for Gets a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetBackupStatusSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBackupStatusSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a backup of the production slot. - /// - public static void DeleteBackupSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, string slot) - { - operations.DeleteBackupSlotAsync(resourceGroupName, name, backupId, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a backup of an app by its ID. - /// - /// - /// Description for Deletes a backup of an app by its ID. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteBackupSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteBackupSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static BackupItem ListBackupStatusSecretsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, BackupRequest request, string slot) - { - return operations.ListBackupStatusSecretsSlotAsync(resourceGroupName, name, backupId, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets status of a web app backup that may be in progress, including secrets - /// associated with the backup, such as the Azure Storage SAS URL. Also can be - /// used to update the SAS URL for the backup if a new URL is passed in the - /// request body. - /// - /// - /// Description for Gets status of a web app backup that may be in progress, - /// including secrets associated with the backup, such as the Azure Storage SAS - /// URL. Also can be used to update the SAS URL for the backup if a new URL is - /// passed in the request body. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of backup. - /// - /// - /// Information on backup request. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListBackupStatusSecretsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, BackupRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupStatusSecretsSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - public static void RestoreSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, string slot) - { - operations.RestoreSlotAsync(resourceGroupName, name, backupId, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static IPage ListBasicPublishingCredentialsPoliciesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListBasicPublishingCredentialsPoliciesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task> ListBasicPublishingCredentialsPoliciesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBasicPublishingCredentialsPoliciesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity GetFtpAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetFtpAllowedSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns whether FTP is allowed on the site or not. - /// - /// - /// Description for Returns whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetFtpAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFtpAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity UpdateFtpAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot) - { - return operations.UpdateFtpAllowedSlotAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates whether FTP is allowed on the site or not. - /// - /// - /// Description for Updates whether FTP is allowed on the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateFtpAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateFtpAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity GetScmAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetScmAllowedSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed on the site or not. - /// - /// - /// Description for Returns whether Scm basic auth is allowed on the site or - /// not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetScmAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetScmAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - public static CsmPublishingCredentialsPoliciesEntity UpdateScmAllowedSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot) - { - return operations.UpdateScmAllowedSlotAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates whether user publishing credentials are allowed on the site or not. - /// - /// - /// Description for Updates whether user publishing credentials are allowed on - /// the site or not. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task UpdateScmAllowedSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingCredentialsPoliciesEntity csmPublishingAccessPoliciesEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateScmAllowedSlotWithHttpMessagesAsync(resourceGroupName, name, csmPublishingAccessPoliciesEntity, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - public static IPage ListConfigurationsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListConfigurationsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the application settings for the production slot. - /// - public static StringDictionary UpdateApplicationSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary appSettings, string slot) - { - return operations.UpdateApplicationSettingsSlotAsync(resourceGroupName, name, appSettings, slot).GetAwaiter().GetResult(); - } - - /// - /// Replaces the application settings of an app. - /// - /// - /// Description for Replaces the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Application settings of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the application settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateApplicationSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary appSettings, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateApplicationSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, appSettings, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the application settings for the production slot. - /// - public static StringDictionary ListApplicationSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListApplicationSettingsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the application settings of an app. - /// - /// - /// Description for Gets the application settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the application settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListApplicationSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListApplicationSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static SiteAuthSettings UpdateAuthSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot) - { - return operations.UpdateAuthSettingsSlotAsync(resourceGroupName, name, siteAuthSettings, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the Authentication / Authorization settings associated with web - /// app. - /// - /// - /// Description for Updates the Authentication / Authorization settings - /// associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAuthSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettings siteAuthSettings, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAuthSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, siteAuthSettings, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - public static SiteAuthSettings GetAuthSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetAuthSettingsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the Authentication/Authorization settings of an app. - /// - /// - /// Description for Gets the Authentication/Authorization settings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - public static SiteAuthSettingsV2 GetAuthSettingsV2WithoutSecretsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetAuthSettingsV2WithoutSecretsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsV2WithoutSecretsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsV2WithoutSecretsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static SiteAuthSettingsV2 UpdateAuthSettingsV2Slot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot) - { - return operations.UpdateAuthSettingsV2SlotAsync(resourceGroupName, name, siteAuthSettingsV2, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Updates site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Auth settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAuthSettingsV2SlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteAuthSettingsV2 siteAuthSettingsV2, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAuthSettingsV2SlotWithHttpMessagesAsync(resourceGroupName, name, siteAuthSettingsV2, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - public static SiteAuthSettingsV2 GetAuthSettingsV2Slot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetAuthSettingsV2SlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets site's Authentication / Authorization settings for apps via the V2 - /// format - /// - /// - /// Description for Gets site's Authentication / Authorization settings for - /// apps via the V2 format - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetAuthSettingsV2SlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAuthSettingsV2SlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - public static AzureStoragePropertyDictionaryResource UpdateAzureStorageAccountsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot) - { - return operations.UpdateAzureStorageAccountsSlotAsync(resourceGroupName, name, azureStorageAccounts, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the Azure storage account configurations of an app. - /// - /// - /// Description for Updates the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Azure storage accounts of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAzureStorageAccountsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, AzureStoragePropertyDictionaryResource azureStorageAccounts, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateAzureStorageAccountsSlotWithHttpMessagesAsync(resourceGroupName, name, azureStorageAccounts, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - public static AzureStoragePropertyDictionaryResource ListAzureStorageAccountsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListAzureStorageAccountsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the Azure storage account configurations of an app. - /// - /// - /// Description for Gets the Azure storage account configurations of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the Azure storage account configurations for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListAzureStorageAccountsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListAzureStorageAccountsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. - /// - public static BackupRequest UpdateBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot) - { - return operations.UpdateBackupConfigurationSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the backup configuration of an app. - /// - /// - /// Description for Updates the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited backup configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the backup configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, BackupRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. - /// - public static void DeleteBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.DeleteBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes the backup configuration of an app. - /// - /// - /// Description for Deletes the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the backup configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. - /// - public static BackupRequest GetBackupConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetBackupConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the backup configuration of an app. - /// - /// - /// Description for Gets the backup configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the backup configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetBackupConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetBackupConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static IPage GetAppSettingsKeyVaultReferencesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetAppSettingsKeyVaultReferencesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task> GetAppSettingsKeyVaultReferencesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingsKeyVaultReferencesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// - public static ApiKVReference GetAppSettingKeyVaultReferenceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, string slot) - { - return operations.GetAppSettingKeyVaultReferenceSlotAsync(resourceGroupName, name, appSettingKey, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// App Setting key name. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetAppSettingKeyVaultReferenceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string appSettingKey, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingKeyVaultReferenceSlotWithHttpMessagesAsync(resourceGroupName, name, appSettingKey, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static IPage GetSiteConnectionStringKeyVaultReferencesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetSiteConnectionStringKeyVaultReferencesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task> GetSiteConnectionStringKeyVaultReferencesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - public static ApiKVReference GetSiteConnectionStringKeyVaultReferenceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, string slot) - { - return operations.GetSiteConnectionStringKeyVaultReferenceSlotAsync(resourceGroupName, name, connectionStringKey, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference and status of an app - /// - /// - /// Description for Gets the config reference and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteConnectionStringKeyVaultReferenceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string connectionStringKey, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferenceSlotWithHttpMessagesAsync(resourceGroupName, name, connectionStringKey, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the connection settings for the production slot. - /// - public static ConnectionStringDictionary UpdateConnectionStringsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot) - { - return operations.UpdateConnectionStringsSlotAsync(resourceGroupName, name, connectionStrings, slot).GetAwaiter().GetResult(); - } - - /// - /// Replaces the connection strings of an app. - /// - /// - /// Description for Replaces the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Connection strings of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the connection settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateConnectionStringsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, ConnectionStringDictionary connectionStrings, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateConnectionStringsSlotWithHttpMessagesAsync(resourceGroupName, name, connectionStrings, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the connection settings for the production slot. - /// - public static ConnectionStringDictionary ListConnectionStringsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListConnectionStringsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the connection strings of an app. - /// - /// - /// Description for Gets the connection strings of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the connection settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListConnectionStringsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConnectionStringsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the logging configuration for the production slot. - /// - public static SiteLogsConfig GetDiagnosticLogsConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetDiagnosticLogsConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the logging configuration of an app. - /// - /// - /// Description for Gets the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the logging configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetDiagnosticLogsConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDiagnosticLogsConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the logging configuration for the production slot. - /// - public static SiteLogsConfig UpdateDiagnosticLogsConfigSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot) - { - return operations.UpdateDiagnosticLogsConfigSlotAsync(resourceGroupName, name, siteLogsConfig, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the logging configuration of an app. - /// - /// - /// Description for Updates the logging configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A SiteLogsConfig JSON object that contains the logging configuration to - /// change in the "properties" property. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the logging configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateDiagnosticLogsConfigSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteLogsConfig siteLogsConfig, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateDiagnosticLogsConfigSlotWithHttpMessagesAsync(resourceGroupName, name, siteLogsConfig, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the metadata for the production slot. - /// - public static StringDictionary UpdateMetadataSlot(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary metadata, string slot) - { - return operations.UpdateMetadataSlotAsync(resourceGroupName, name, metadata, slot).GetAwaiter().GetResult(); - } - - /// - /// Replaces the metadata of an app. - /// - /// - /// Description for Replaces the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Edited metadata of the app or deployment slot. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the metadata for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateMetadataSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, StringDictionary metadata, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateMetadataSlotWithHttpMessagesAsync(resourceGroupName, name, metadata, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the metadata for the production slot. - /// - public static StringDictionary ListMetadataSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListMetadataSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the metadata of an app. - /// - /// - /// Description for Gets the metadata of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the metadata for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListMetadataSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListMetadataSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - public static User ListPublishingCredentialsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListPublishingCredentialsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListPublishingCredentialsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublishingCredentialsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static PushSettings UpdateSitePushSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, PushSettings pushSettings, string slot) - { - return operations.UpdateSitePushSettingsSlotAsync(resourceGroupName, name, pushSettings, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the Push settings associated with web app. - /// - /// - /// Description for Updates the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Push settings associated with web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSitePushSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PushSettings pushSettings, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSitePushSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, pushSettings, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static PushSettings ListSitePushSettingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSitePushSettingsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the Push settings associated with web app. - /// - /// - /// Description for Gets the Push settings associated with web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListSitePushSettingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSitePushSettingsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - public static SiteConfigResource GetConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the configuration of an app, such as platform version and bitness, - /// default documents, virtual applications, Always On, etc. - /// - /// - /// Description for Gets the configuration of an app, such as platform version - /// and bitness, default documents, virtual applications, Always On, etc. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - public static SiteConfigResource CreateOrUpdateConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, string slot) - { - return operations.CreateOrUpdateConfigurationSlotAsync(resourceGroupName, name, siteConfig, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, siteConfig, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - public static SiteConfigResource UpdateConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, string slot) - { - return operations.UpdateConfigurationSlotAsync(resourceGroupName, name, siteConfig, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the configuration of an app. - /// - /// - /// Description for Updates the configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteConfig object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteConfigResource siteConfig, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, siteConfig, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - public static IPage ListConfigurationSnapshotInfoSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListConfigurationSnapshotInfoSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationSnapshotInfoSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationSnapshotInfoSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - public static SiteConfigResource GetConfigurationSnapshotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, string slot) - { - return operations.GetConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a snapshot of the configuration of an app at a previous point in time. - /// - /// - /// Description for Gets a snapshot of the configuration of an app at a - /// previous point in time. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetConfigurationSnapshotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetConfigurationSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, snapshotId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - public static void RecoverSiteConfigurationSnapshotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, string slot) - { - operations.RecoverSiteConfigurationSnapshotSlotAsync(resourceGroupName, name, snapshotId, slot).GetAwaiter().GetResult(); - } - - /// - /// Reverts the configuration of an app to a previous snapshot. - /// - /// - /// Description for Reverts the configuration of an app to a previous snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of the snapshot to read. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// return configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task RecoverSiteConfigurationSnapshotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string snapshotId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RecoverSiteConfigurationSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, snapshotId, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static Stream GetWebSiteContainerLogsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetWebSiteContainerLogsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the last lines of docker logs for the given site - /// - /// - /// Description for Gets the last lines of docker logs for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetWebSiteContainerLogsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetWebSiteContainerLogsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static Stream GetContainerLogsZipSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetContainerLogsZipSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the ZIP archived docker log files for the given site - /// - /// - /// Description for Gets the ZIP archived docker log files for the given site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetContainerLogsZipSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetContainerLogsZipSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static IPage ListContinuousWebJobsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListContinuousWebJobsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListContinuousWebJobsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListContinuousWebJobsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static ContinuousWebJob GetContinuousWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - return operations.GetContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetContinuousWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetContinuousWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static void DeleteContinuousWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - operations.DeleteContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a continuous web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a continuous web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteContinuousWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteContinuousWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static void StartContinuousWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - operations.StartContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Start a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Start a continuous web job for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task StartContinuousWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StartContinuousWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static void StopContinuousWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - operations.StopContinuousWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// Description for Stop a continuous web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task StopContinuousWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopContinuousWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static IPage ListDeploymentsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListDeploymentsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDeploymentsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets a - /// deployment for the production slot. - /// - public static Deployment GetDeploymentSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot) - { - return operations.GetDeploymentSlotAsync(resourceGroupName, name, id, slot).GetAwaiter().GetResult(); - } - - /// - /// Get a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Get a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetDeploymentSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDeploymentSlotWithHttpMessagesAsync(resourceGroupName, name, id, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API creates a - /// deployment for the production slot. - /// - /// - /// Deployment details. - /// - public static Deployment CreateDeploymentSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot, Deployment deployment) - { - return operations.CreateDeploymentSlotAsync(resourceGroupName, name, id, slot, deployment).GetAwaiter().GetResult(); - } - - /// - /// Create a deployment for an app, or a deployment slot. - /// - /// - /// Description for Create a deployment for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of an existing deployment. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API creates a - /// deployment for the production slot. - /// - /// - /// Deployment details. - /// - /// - /// The cancellation token. - /// - public static async Task CreateDeploymentSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot, Deployment deployment, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateDeploymentSlotWithHttpMessagesAsync(resourceGroupName, name, id, slot, deployment, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static void DeleteDeploymentSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot) - { - operations.DeleteDeploymentSlotAsync(resourceGroupName, name, id, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a deployment by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a deployment by its ID for an app, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Deployment ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteDeploymentSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteDeploymentSlotWithHttpMessagesAsync(resourceGroupName, name, id, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static Deployment ListDeploymentLogSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot) - { - return operations.ListDeploymentLogSlotAsync(resourceGroupName, name, id, slot).GetAwaiter().GetResult(); - } - - /// - /// List deployment log for specific deployment for an app, or a deployment - /// slot. - /// - /// - /// Description for List deployment log for specific deployment for an app, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The ID of a specific deployment. This is the value of the name property in - /// the JSON response from "GET /api/sites/{siteName}/deployments". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListDeploymentLogSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string id, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentLogSlotWithHttpMessagesAsync(resourceGroupName, name, id, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// perform discovery for the production slot. - /// - public static RestoreRequest DiscoverBackupSlot(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot) - { - return operations.DiscoverBackupSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Discovers an existing app backup that can be restored from a blob in Azure - /// storage. Use this to get information about the databases stored in a - /// backup. - /// - /// - /// Description for Discovers an existing app backup that can be restored from - /// a blob in Azure storage. Use this to get information about the databases - /// stored in a backup. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// A RestoreRequest object that includes Azure storage URL and blog name for - /// discovery of backup. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// perform discovery for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DiscoverBackupSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DiscoverBackupSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - public static IPage ListDomainOwnershipIdentifiersSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListDomainOwnershipIdentifiersSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDomainOwnershipIdentifiersSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDomainOwnershipIdentifiersSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - public static Identifier GetDomainOwnershipIdentifierSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot) - { - return operations.GetDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get domain ownership identifier for web app. - /// - /// - /// Description for Get domain ownership identifier for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetDomainOwnershipIdentifierSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetDomainOwnershipIdentifierSlotWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - public static Identifier CreateOrUpdateDomainOwnershipIdentifierSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot) - { - return operations.CreateOrUpdateDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateDomainOwnershipIdentifierSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - public static void DeleteDomainOwnershipIdentifierSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot) - { - operations.DeleteDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a domain ownership identifier for a web app. - /// - /// - /// Description for Deletes a domain ownership identifier for a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteDomainOwnershipIdentifierSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteDomainOwnershipIdentifierSlotWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - public static Identifier UpdateDomainOwnershipIdentifierSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot) - { - return operations.UpdateDomainOwnershipIdentifierSlotAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a domain ownership identifier for web app, or updates an existing - /// ownership identifier. - /// - /// - /// Description for Creates a domain ownership identifier for web app, or - /// updates an existing ownership identifier. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of domain ownership identifier. - /// - /// - /// A JSON representation of the domain ownership properties. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateDomainOwnershipIdentifierSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string domainOwnershipIdentifierName, Identifier domainOwnershipIdentifier, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateDomainOwnershipIdentifierSlotWithHttpMessagesAsync(resourceGroupName, name, domainOwnershipIdentifierName, domainOwnershipIdentifier, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static MSDeployStatus GetMSDeployStatusSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetMSDeployStatusSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetMSDeployStatusSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMSDeployStatusSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus CreateMSDeployOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, MSDeploy mSDeploy) - { - return operations.CreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task CreateMSDeployOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static MSDeployLog GetMSDeployLogSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetMSDeployLogSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetMSDeployLogSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMSDeployLogSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - public static IPage ListInstanceFunctionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListInstanceFunctionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceFunctionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceFunctionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static string GetFunctionsAdminTokenSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetFunctionsAdminTokenSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Fetch a short lived token that can be exchanged for a master key. - /// - /// - /// Description for Fetch a short lived token that can be exchanged for a - /// master key. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetFunctionsAdminTokenSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetFunctionsAdminTokenSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - public static FunctionEnvelope GetInstanceFunctionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot) - { - return operations.GetInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get function information by its ID for web site, or a deployment slot. - /// - /// - /// Description for Get function information by its ID for web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceFunctionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - public static FunctionEnvelope CreateInstanceFunctionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope) - { - return operations.CreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// The cancellation token. - /// - public static async Task CreateInstanceFunctionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, functionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - public static void DeleteInstanceFunctionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot) - { - operations.DeleteInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a function for web site, or a deployment slot. - /// - /// - /// Description for Delete a function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteInstanceFunctionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update - /// - public static KeyInfo CreateOrUpdateFunctionSecretSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key) - { - return operations.CreateOrUpdateFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot, key).GetAwaiter().GetResult(); - } - - /// - /// Add or update a function secret. - /// - /// - /// Description for Add or update a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateFunctionSecretSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, string slot, KeyInfo key, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateFunctionSecretSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, keyName, slot, key, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - public static void DeleteFunctionSecretSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, string slot) - { - operations.DeleteFunctionSecretSlotAsync(resourceGroupName, name, functionName, keyName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a function secret. - /// - /// - /// Description for Delete a function secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The name of the function. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteFunctionSecretSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string keyName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteFunctionSecretSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, keyName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - public static StringDictionary ListFunctionKeysSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot) - { - return operations.ListFunctionKeysSlotAsync(resourceGroupName, name, functionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get function keys for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function keys for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListFunctionKeysSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionKeysSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - public static FunctionSecrets ListFunctionSecretsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot) - { - return operations.ListFunctionSecretsSlotAsync(resourceGroupName, name, functionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get function secrets for a function in a web site, or a deployment slot. - /// - /// - /// Description for Get function secrets for a function in a web site, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListFunctionSecretsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionSecretsSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - public static HostKeys ListHostKeysSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListHostKeysSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get host secrets for a function app. - /// - /// - /// Description for Get host secrets for a function app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListHostKeysSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostKeysSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - public static void ListSyncStatusSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.ListSyncStatusSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListSyncStatusSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ListSyncStatusSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - public static void SyncFunctionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.SyncFunctionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task SyncFunctionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncFunctionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update - /// - public static KeyInfo CreateOrUpdateHostSecretSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key) - { - return operations.CreateOrUpdateHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot, key).GetAwaiter().GetResult(); - } - - /// - /// Add or update a host level secret. - /// - /// - /// Description for Add or update a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The key to create or update - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHostSecretSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, string slot, KeyInfo key, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHostSecretSlotWithHttpMessagesAsync(resourceGroupName, name, keyType, keyName, slot, key, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - public static void DeleteHostSecretSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, string slot) - { - operations.DeleteHostSecretSlotAsync(resourceGroupName, name, keyType, keyName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a host level secret. - /// - /// - /// Description for Delete a host level secret. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The type of host key. - /// - /// - /// The name of the key. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHostSecretSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string keyType, string keyName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHostSecretSlotWithHttpMessagesAsync(resourceGroupName, name, keyType, keyName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - public static IPage ListHostNameBindingsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListHostNameBindingsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostNameBindingsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostNameBindingsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - public static HostNameBinding GetHostNameBindingSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName) - { - return operations.GetHostNameBindingSlotAsync(resourceGroupName, name, slot, hostName).GetAwaiter().GetResult(); - } - - /// - /// Get the named hostname binding for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named hostname binding for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// The cancellation token. - /// - public static async Task GetHostNameBindingSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHostNameBindingSlotWithHttpMessagesAsync(resourceGroupName, name, slot, hostName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - public static HostNameBinding CreateOrUpdateHostNameBindingSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot) - { - return operations.CreateOrUpdateHostNameBindingSlotAsync(resourceGroupName, name, hostName, hostNameBinding, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// Binding details. This is the JSON representation of a HostNameBinding - /// object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHostNameBindingSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string hostName, HostNameBinding hostNameBinding, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHostNameBindingSlotWithHttpMessagesAsync(resourceGroupName, name, hostName, hostNameBinding, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - public static void DeleteHostNameBindingSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName) - { - operations.DeleteHostNameBindingSlotAsync(resourceGroupName, name, slot, hostName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Hostname in the hostname binding. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHostNameBindingSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string hostName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHostNameBindingSlotWithHttpMessagesAsync(resourceGroupName, name, slot, hostName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - public static HybridConnection GetHybridConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, string slot) - { - return operations.GetHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot).GetAwaiter().GetResult(); - } - - /// - /// Retrieves a specific Service Bus Hybrid Connection used by this Web App. - /// - /// - /// Description for Retrieves a specific Service Bus Hybrid Connection used by - /// this Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetHybridConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetHybridConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - public static HybridConnection CreateOrUpdateHybridConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot) - { - return operations.CreateOrUpdateHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateHybridConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateHybridConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - public static void DeleteHybridConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, string slot) - { - operations.DeleteHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, slot).GetAwaiter().GetResult(); - } - - /// - /// Removes a Hybrid Connection from this site. - /// - /// - /// Description for Removes a Hybrid Connection from this site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteHybridConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteHybridConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - public static HybridConnection UpdateHybridConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot) - { - return operations.UpdateHybridConnectionSlotAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// Description for Creates a new Hybrid Connection using a Service Bus relay. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The namespace for this hybrid connection. - /// - /// - /// The relay name for this hybrid connection. - /// - /// - /// The details of the hybrid connection. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateHybridConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string namespaceName, string relayName, HybridConnection connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateHybridConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, namespaceName, relayName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - public static HybridConnection ListHybridConnectionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListHybridConnectionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Retrieves all Service Bus Hybrid Connections used by this Web App. - /// - /// - /// Description for Retrieves all Service Bus Hybrid Connections used by this - /// Web App. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task ListHybridConnectionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHybridConnectionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// hybrid connections for the production slot. - /// - public static RelayServiceConnectionEntity ListRelayServiceConnectionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListRelayServiceConnectionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets hybrid connections configured for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets hybrid connections configured for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// hybrid connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListRelayServiceConnectionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListRelayServiceConnectionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// hybrid connection for the production slot. - /// - public static RelayServiceConnectionEntity GetRelayServiceConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, string slot) - { - return operations.GetRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a hybrid connection configuration by its name. - /// - /// - /// Description for Gets a hybrid connection configuration by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// hybrid connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetRelayServiceConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetRelayServiceConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, entityName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - public static RelayServiceConnectionEntity CreateOrUpdateRelayServiceConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot) - { - return operations.CreateOrUpdateRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateRelayServiceConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateRelayServiceConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, entityName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a hybrid connection for the production slot. - /// - public static void DeleteRelayServiceConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, string slot) - { - operations.DeleteRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a relay service connection by its name. - /// - /// - /// Description for Deletes a relay service connection by its name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete a hybrid connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteRelayServiceConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteRelayServiceConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, entityName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - public static RelayServiceConnectionEntity UpdateRelayServiceConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot) - { - return operations.UpdateRelayServiceConnectionSlotAsync(resourceGroupName, name, entityName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new hybrid connection configuration (PUT), or updates an existing - /// one (PATCH). - /// - /// - /// Description for Creates a new hybrid connection configuration (PUT), or - /// updates an existing one (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the hybrid connection configuration. - /// - /// - /// Details of the hybrid connection configuration. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create or update a hybrid connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateRelayServiceConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string entityName, RelayServiceConnectionEntity connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateRelayServiceConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, entityName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - public static IPage ListInstanceIdentifiersSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListInstanceIdentifiersSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceIdentifiersSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceIdentifiersSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - public static WebSiteInstanceStatus GetInstanceInfoSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, string slot) - { - return operations.GetInstanceInfoSlotAsync(resourceGroupName, name, instanceId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets the - /// production slot instances. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceInfoSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceInfoSlotWithHttpMessagesAsync(resourceGroupName, name, instanceId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - public static MSDeployStatus GetInstanceMsDeployStatusSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId) - { - return operations.GetInstanceMsDeployStatusSlotAsync(resourceGroupName, name, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get the status of the last MSDeploy operation. - /// - /// - /// Description for Get the status of the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceMsDeployStatusSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceMsDeployStatusSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus CreateInstanceMSDeployOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy) - { - return operations.CreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task CreateInstanceMSDeployOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - public static MSDeployLog GetInstanceMSDeployLogSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId) - { - return operations.GetInstanceMSDeployLogSlotAsync(resourceGroupName, name, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// Description for Get the MSDeploy Log for the last MSDeploy operation. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceMSDeployLogSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceMSDeployLogSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcessesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId) - { - return operations.ListInstanceProcessesSlotAsync(resourceGroupName, name, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static ProcessInfo GetInstanceProcessSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId) - { - return operations.GetInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceProcessSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static void DeleteInstanceProcessSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId) - { - operations.DeleteInstanceProcessSlotAsync(resourceGroupName, name, processId, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task DeleteInstanceProcessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteInstanceProcessSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, instanceId, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static Stream GetInstanceProcessDumpSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId) - { - return operations.GetInstanceProcessDumpSlotAsync(resourceGroupName, name, processId, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessDumpSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetInstanceProcessDumpSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, instanceId, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcessModulesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId) - { - return operations.ListInstanceProcessModulesSlotAsync(resourceGroupName, name, processId, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessModulesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessModulesSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static ProcessModuleInfo GetInstanceProcessModuleSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId) - { - return operations.GetInstanceProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task GetInstanceProcessModuleSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetInstanceProcessModuleSlotWithHttpMessagesAsync(resourceGroupName, name, processId, baseAddress, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - public static IPage ListInstanceProcessThreadsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId) - { - return operations.ListInstanceProcessThreadsSlotAsync(resourceGroupName, name, processId, slot, instanceId).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// ID of a specific scaled-out instance. This is the value of the name - /// property in the JSON response from "GET api/sites/{siteName}/instances". - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessThreadsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessThreadsSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, instanceId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns information on - /// the production slot. - /// - public static SiteCloneability IsCloneableSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.IsCloneableSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Shows whether an app can be cloned to another resource group or - /// subscription. - /// - /// - /// Description for Shows whether an app can be cloned to another resource - /// group or subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. By default, this API returns information on - /// the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task IsCloneableSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.IsCloneableSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - public static IPage ListSiteBackupsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSiteBackupsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// backups of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteBackupsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteBackupsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - public static FunctionSecrets ListSyncFunctionTriggersSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSyncFunctionTriggersSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// This is to allow calling via powershell and ARM template. - /// - /// - /// Description for This is to allow calling via powershell and ARM template. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListSyncFunctionTriggersSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSyncFunctionTriggersSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of the deployment slot. - /// - public static MigrateMySqlStatus GetMigrateMySqlStatusSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetMigrateMySqlStatusSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns the status of MySql in app migration, if one is active, and whether - /// or not MySql in app is enabled - /// - /// - /// Description for Returns the status of MySql in app migration, if one is - /// active, and whether or not MySql in app is enabled - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetMigrateMySqlStatusSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetMigrateMySqlStatusSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - public static SwiftVirtualNetwork GetSwiftVirtualNetworkConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetSwiftVirtualNetworkConnectionSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a Swift Virtual Network connection. - /// - /// - /// Description for Gets a Swift Virtual Network connection. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task GetSwiftVirtualNetworkConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSwiftVirtualNetworkConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static SwiftVirtualNetwork CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) - { - return operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - public static void DeleteSwiftVirtualNetworkSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.DeleteSwiftVirtualNetworkSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a Swift Virtual Network connection from an app (or deployment - /// slot). - /// - /// - /// Description for Deletes a Swift Virtual Network connection from an app (or - /// deployment slot). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSwiftVirtualNetworkSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSwiftVirtualNetworkSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static SwiftVirtualNetwork UpdateSwiftVirtualNetworkConnectionWithCheckSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot) - { - return operations.UpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(resourceGroupName, name, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Integrates this Web App with a Virtual Network. This requires that 1) - /// "swiftSupported" is true when doing a GET against this resource, and 2) - /// that the target Subnet has already been delegated, and is not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// Description for Integrates this Web App with a Virtual Network. This - /// requires that 1) "swiftSupported" is true when doing a GET against this - /// resource, and 2) that the target Subnet has already been delegated, and is - /// not - /// in use by another App Service Plan other than the one this App is in. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSwiftVirtualNetworkConnectionWithCheckSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SwiftVirtualNetwork connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSwiftVirtualNetworkConnectionWithCheckSlotWithHttpMessagesAsync(resourceGroupName, name, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// network features for the production slot. - /// - public static NetworkFeatures ListNetworkFeaturesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string view, string slot) - { - return operations.ListNetworkFeaturesSlotAsync(resourceGroupName, name, view, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets all network features used by the app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets all network features used by the app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The type of view. Only "summary" is supported at this time. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// network features for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListNetworkFeaturesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string view, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNetworkFeaturesSlotWithHttpMessagesAsync(resourceGroupName, name, view, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - public static IList GetNetworkTraceOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot) - { - return operations.GetNetworkTraceOperationSlotAsync(resourceGroupName, name, operationId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTraceOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, operationId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static string StartWebSiteNetworkTraceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartWebSiteNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site (To be deprecated). - /// - /// - /// Description for Start capturing network packets for the site (To be - /// deprecated). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task StartWebSiteNetworkTraceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartWebSiteNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList StartWebSiteNetworkTraceOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartWebSiteNetworkTraceOperationSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> StartWebSiteNetworkTraceOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - public static void StopWebSiteNetworkTraceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.StopWebSiteNetworkTraceSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The cancellation token. - /// - public static async Task StopWebSiteNetworkTraceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopWebSiteNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - public static IList GetNetworkTracesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot) - { - return operations.GetNetworkTracesSlotAsync(resourceGroupName, name, operationId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTracesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTracesSlotWithHttpMessagesAsync(resourceGroupName, name, operationId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - public static IList GetNetworkTraceOperationSlotV2(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot) - { - return operations.GetNetworkTraceOperationSlotV2Async(resourceGroupName, name, operationId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTraceOperationSlotV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTraceOperationSlotV2WithHttpMessagesAsync(resourceGroupName, name, operationId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - public static IList GetNetworkTracesSlotV2(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot) - { - return operations.GetNetworkTracesSlotV2Async(resourceGroupName, name, operationId, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a named operation for a network trace capturing (or deployment slot, - /// if specified). - /// - /// - /// Description for Gets a named operation for a network trace capturing (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// GUID of the operation. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// an operation for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> GetNetworkTracesSlotV2Async(this IWebAppsOperations operations, string resourceGroupName, string name, string operationId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetNetworkTracesSlotV2WithHttpMessagesAsync(resourceGroupName, name, operationId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API generate a - /// new publishing password for the production slot. - /// - public static void GenerateNewSitePublishingPasswordSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.GenerateNewSitePublishingPasswordSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Generates a new publishing password for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Generates a new publishing password for an app (or - /// deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API generate a - /// new publishing password for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GenerateNewSitePublishingPasswordSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.GenerateNewSitePublishingPasswordSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - public static IPage ListPerfMonCountersSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string filter = default(string)) - { - return operations.ListPerfMonCountersSlotAsync(resourceGroupName, name, slot, filter).GetAwaiter().GetResult(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Return only usages/metrics specified in the filter. Filter conforms to - /// odata syntax. Example: $filter=(startTime eq 2014-01-01T00:00:00Z and - /// endTime eq 2014-12-31T23:59:59Z and timeGrain eq - /// duration'[Hour|Minute|Day]'. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPerfMonCountersSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPerfMonCountersSlotWithHttpMessagesAsync(resourceGroupName, name, slot, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static SitePhpErrorLogFlag GetSitePhpErrorLogFlagSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetSitePhpErrorLogFlagSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets web app's event logs. - /// - /// - /// Description for Gets web app's event logs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetSitePhpErrorLogFlagSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSitePhpErrorLogFlagSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the premier add-ons for the production slot. - /// - public static PremierAddOn ListPremierAddOnsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListPremierAddOnsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the premier add-ons of an app. - /// - /// - /// Description for Gets the premier add-ons of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the premier add-ons for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListPremierAddOnsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPremierAddOnsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named add-on for the production slot. - /// - public static PremierAddOn GetPremierAddOnSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, string slot) - { - return operations.GetPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a named add-on of an app. - /// - /// - /// Description for Gets a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named add-on for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetPremierAddOnSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPremierAddOnSlotWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - public static PremierAddOn AddPremierAddOnSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot) - { - return operations.AddPremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, premierAddOn, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task AddPremierAddOnSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOn premierAddOn, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.AddPremierAddOnSlotWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, premierAddOn, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the named add-on for the production slot. - /// - public static void DeletePremierAddOnSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, string slot) - { - operations.DeletePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a premier add-on from an app. - /// - /// - /// Description for Delete a premier add-on from an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the named add-on for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeletePremierAddOnSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeletePremierAddOnSlotWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - public static PremierAddOn UpdatePremierAddOnSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot) - { - return operations.UpdatePremierAddOnSlotAsync(resourceGroupName, name, premierAddOnName, premierAddOn, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates a named add-on of an app. - /// - /// - /// Description for Updates a named add-on of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Add-on name. - /// - /// - /// A JSON representation of the edited premier add-on. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the named add-on for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdatePremierAddOnSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string premierAddOnName, PremierAddOnPatchResource premierAddOn, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdatePremierAddOnSlotWithHttpMessagesAsync(resourceGroupName, name, premierAddOnName, premierAddOn, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - public static PrivateAccess GetPrivateAccessSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetPrivateAccessSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Gets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateAccessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateAccessSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// The name of the slot for the web app. - /// - public static PrivateAccess PutPrivateAccessVnetSlot(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot) - { - return operations.PutPrivateAccessVnetSlotAsync(resourceGroupName, name, access, slot).GetAwaiter().GetResult(); - } - - /// - /// Sets data around private site access enablement and authorized Virtual - /// Networks that can access the site. - /// - /// - /// Description for Sets data around private site access enablement and - /// authorized Virtual Networks that can access the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The information for the private access - /// - /// - /// The name of the slot for the web app. - /// - /// - /// The cancellation token. - /// - public static async Task PutPrivateAccessVnetSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, PrivateAccess access, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.PutPrivateAccessVnetSlotWithHttpMessagesAsync(resourceGroupName, name, access, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the site deployment slot. - /// - public static IPage GetPrivateEndpointConnectionListSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetPrivateEndpointConnectionListSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Name of the site deployment slot. - /// - public static RemotePrivateEndpointConnectionARMResource GetPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) - { - return operations.GetPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a private endpoint connection - /// - /// - /// Description for Gets a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// Name of the private endpoint connection. - /// - /// - /// Name of the site deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource ApproveOrRejectPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot) - { - return operations.ApproveOrRejectPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task ApproveOrRejectPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - public static object DeletePrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) - { - return operations.DeletePrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeletePrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.DeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - public static PrivateLinkResourcesWrapper GetPrivateLinkResourcesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetPrivateLinkResourcesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the private link resources - /// - /// - /// Description for Gets the private link resources - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task GetPrivateLinkResourcesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateLinkResourcesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static IPage ListProcessesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListProcessesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static ProcessInfo GetProcessSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot) - { - return operations.GetProcessSlotAsync(resourceGroupName, name, processId, slot).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetProcessSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static void DeleteProcessSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot) - { - operations.DeleteProcessSlotAsync(resourceGroupName, name, processId, slot).GetAwaiter().GetResult(); - } - - /// - /// Terminate a process by its ID for a web site, or a deployment slot, or - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Terminate a process by its ID for a web site, or a - /// deployment slot, or specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteProcessSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteProcessSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static Stream GetProcessDumpSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot) - { - return operations.GetProcessDumpSlotAsync(resourceGroupName, name, processId, slot).GetAwaiter().GetResult(); - } - - /// - /// Get a memory dump of a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for Get a memory dump of a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessDumpSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.GetProcessDumpSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static IPage ListProcessModulesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot) - { - return operations.ListProcessModulesSlotAsync(resourceGroupName, name, processId, slot).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessModulesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessModulesSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static ProcessModuleInfo GetProcessModuleSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string slot) - { - return operations.GetProcessModuleSlotAsync(resourceGroupName, name, processId, baseAddress, slot).GetAwaiter().GetResult(); - } - - /// - /// Get process information by its ID for a specific scaled-out instance in a - /// web site. - /// - /// - /// Description for Get process information by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Module base address. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetProcessModuleSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string baseAddress, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetProcessModuleSlotWithHttpMessagesAsync(resourceGroupName, name, processId, baseAddress, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static IPage ListProcessThreadsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot) - { - return operations.ListProcessThreadsSlotAsync(resourceGroupName, name, processId, slot).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// PID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessThreadsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string processId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessThreadsSlotWithHttpMessagesAsync(resourceGroupName, name, processId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - public static IPage ListPublicCertificatesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListPublicCertificatesSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API gets - /// hostname bindings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPublicCertificatesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublicCertificatesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Public certificate name. - /// - public static PublicCertificate GetPublicCertificateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string publicCertificateName) - { - return operations.GetPublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName).GetAwaiter().GetResult(); - } - - /// - /// Get the named public certificate for an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Get the named public certificate for an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API the named - /// binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// The cancellation token. - /// - public static async Task GetPublicCertificateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string publicCertificateName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPublicCertificateSlotWithHttpMessagesAsync(resourceGroupName, name, slot, publicCertificateName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - public static PublicCertificate CreateOrUpdatePublicCertificateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot) - { - return operations.CreateOrUpdatePublicCertificateSlotAsync(resourceGroupName, name, publicCertificateName, publicCertificate, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a hostname binding for an app. - /// - /// - /// Description for Creates a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Public certificate name. - /// - /// - /// Public certificate details. This is the JSON representation of a - /// PublicCertificate object. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// create a binding for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdatePublicCertificateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string publicCertificateName, PublicCertificate publicCertificate, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdatePublicCertificateSlotWithHttpMessagesAsync(resourceGroupName, name, publicCertificateName, publicCertificate, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Public certificate name. - /// - public static void DeletePublicCertificateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string publicCertificateName) - { - operations.DeletePublicCertificateSlotAsync(resourceGroupName, name, slot, publicCertificateName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a hostname binding for an app. - /// - /// - /// Description for Deletes a hostname binding for an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the binding for the production slot. - /// - /// - /// Public certificate name. - /// - /// - /// The cancellation token. - /// - public static async Task DeletePublicCertificateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string publicCertificateName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeletePublicCertificateSlotWithHttpMessagesAsync(resourceGroupName, name, slot, publicCertificateName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing profile for the production slot. - /// - public static Stream ListPublishingProfileXmlWithSecretsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot) - { - return operations.ListPublishingProfileXmlWithSecretsSlotAsync(resourceGroupName, name, publishingProfileOptions, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the publishing profile for an app (or deployment slot, if specified). - /// - /// - /// Description for Gets the publishing profile for an app (or deployment slot, - /// if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Specifies publishingProfileOptions for publishing profile. For example, use - /// {"format": "FileZilla3"} to get a FileZilla publishing profile. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing profile for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ListPublishingProfileXmlWithSecretsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmPublishingProfileOptions publishingProfileOptions, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - var _result = await operations.ListPublishingProfileXmlWithSecretsSlotWithHttpMessagesAsync(resourceGroupName, name, publishingProfileOptions, slot, null, cancellationToken).ConfigureAwait(false); - _result.Request.Dispose(); - return _result.Body; - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API resets - /// configuration settings for the production slot. - /// - public static void ResetSlotConfigurationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.ResetSlotConfigurationSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Resets the configuration settings of the current slot if they were - /// previously modified by calling the API with POST. - /// - /// - /// Description for Resets the configuration settings of the current slot if - /// they were previously modified by calling the API with POST. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API resets - /// configuration settings for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task ResetSlotConfigurationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ResetSlotConfigurationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restart the production slot. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - public static void RestartSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?)) - { - operations.RestartSlotAsync(resourceGroupName, name, slot, softRestart, synchronous).GetAwaiter().GetResult(); - } - - /// - /// Restarts an app (or deployment slot, if specified). - /// - /// - /// Description for Restarts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restart the production slot. - /// - /// - /// Specify true to apply the configuration settings and restarts the app only - /// if necessary. By default, the API always restarts and reprovisions the app. - /// - /// - /// Specify true to block until the app is restarted. By default, it is set to - /// false, and the API responds immediately (asynchronous). - /// - /// - /// The cancellation token. - /// - public static async Task RestartSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, bool? softRestart = default(bool?), bool? synchronous = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestartSlotWithHttpMessagesAsync(resourceGroupName, name, slot, softRestart, synchronous, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - public static void RestoreFromBackupBlobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot) - { - operations.RestoreFromBackupBlobSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreFromBackupBlobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static void RestoreFromDeletedAppSlot(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot) - { - operations.RestoreFromDeletedAppSlotAsync(resourceGroupName, name, restoreRequest, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreFromDeletedAppSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static void RestoreSnapshotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot) - { - operations.RestoreSnapshotSlotAsync(resourceGroupName, name, restoreRequest, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task RestoreSnapshotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static IPage ListSiteExtensionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSiteExtensionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteExtensionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteExtensionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static SiteExtensionInfo GetSiteExtensionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot) - { - return operations.GetSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).GetAwaiter().GetResult(); - } - - /// - /// Get site extension information by its ID for a web site, or a deployment - /// slot. - /// - /// - /// Description for Get site extension information by its ID for a web site, or - /// a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetSiteExtensionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static SiteExtensionInfo InstallSiteExtensionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot) - { - return operations.InstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).GetAwaiter().GetResult(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task InstallSiteExtensionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.InstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static void DeleteSiteExtensionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot) - { - operations.DeleteSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).GetAwaiter().GetResult(); - } - - /// - /// Remove a site extension from a web site, or a deployment slot. - /// - /// - /// Description for Remove a site extension from a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSiteExtensionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static IPage ListSlotDifferencesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot) - { - return operations.ListSlotDifferencesSlotAsync(resourceGroupName, name, slotSwapEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotDifferencesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotDifferencesSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static void SwapSlotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot) - { - operations.SwapSlotSlotAsync(resourceGroupName, name, slotSwapEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task SwapSlotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - public static IPage ListSnapshotsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSnapshotsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - public static IPage ListSnapshotsFromDRSecondarySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListSnapshotsFromDRSecondarySlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// Website Slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsFromDRSecondarySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsFromDRSecondarySlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the source control configuration for the production slot. - /// - public static SiteSourceControl GetSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.GetSourceControlSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the source control configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - public static SiteSourceControl CreateOrUpdateSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot) - { - return operations.CreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, siteSourceControl, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the source control configuration for the production slot. - /// - /// - /// - public static void DeleteSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string additionalFlags = default(string)) - { - operations.DeleteSourceControlSlotAsync(resourceGroupName, name, slot, additionalFlags).GetAwaiter().GetResult(); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the source control configuration for the production slot. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string additionalFlags = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, slot, additionalFlags, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - public static SiteSourceControl UpdateSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot) - { - return operations.UpdateSourceControlSlotAsync(resourceGroupName, name, siteSourceControl, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will start - /// the production slot. - /// - public static void StartSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.StartSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will start - /// the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task StartSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StartSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList StartNetworkTraceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> StartNetworkTraceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will stop - /// the production slot. - /// - public static void StopSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.StopSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will stop - /// the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task StopSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - public static void StopNetworkTraceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.StopNetworkTraceSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The cancellation token. - /// - public static async Task StopNetworkTraceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static void SyncRepositorySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.SyncRepositorySlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task SyncRepositorySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncRepositorySlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - public static void SyncFunctionTriggersSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - operations.SyncFunctionTriggersSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. - /// - /// - /// The cancellation token. - /// - public static async Task SyncFunctionTriggersSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncFunctionTriggersSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - public static IPage ListTriggeredWebJobsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListTriggeredWebJobsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes a - /// deployment for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static TriggeredWebJob GetTriggeredWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - return operations.GetTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetTriggeredWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetTriggeredWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes - /// web job for the production slot. - /// - public static void DeleteTriggeredWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - operations.DeleteTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API deletes - /// web job for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteTriggeredWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteTriggeredWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static IPage ListTriggeredWebJobHistorySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - return operations.ListTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobHistorySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobHistorySlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static TriggeredJobHistory GetTriggeredWebJobHistorySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string id, string slot) - { - return operations.GetTriggeredWebJobHistorySlotAsync(resourceGroupName, name, webJobName, id, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetTriggeredWebJobHistorySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string id, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetTriggeredWebJobHistorySlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, id, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static void RunTriggeredWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - operations.RunTriggeredWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task RunTriggeredWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RunTriggeredWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// quota information of the production slot. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - public static IPage ListUsagesSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string filter = default(string)) - { - return operations.ListUsagesSlotAsync(resourceGroupName, name, slot, filter).GetAwaiter().GetResult(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// quota information of the production slot. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesSlotWithHttpMessagesAsync(resourceGroupName, name, slot, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// virtual network connections for the production slot. - /// - public static IList ListVnetConnectionsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListVnetConnectionsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// virtual network connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListVnetConnectionsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListVnetConnectionsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named virtual network for the production slot. - /// - public static VnetInfoResource GetVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot) - { - return operations.GetVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the named virtual network for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static VnetInfoResource CreateOrUpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot) - { - return operations.CreateOrUpdateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - public static void DeleteVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot) - { - operations.DeleteVnetConnectionSlotAsync(resourceGroupName, name, vnetName, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// delete the connection for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - public static VnetInfoResource UpdateVnetConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot) - { - return operations.UpdateVnetConnectionSlotAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update connections for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - public static VnetGateway GetVnetConnectionGatewaySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, string slot) - { - return operations.GetVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get a - /// gateway for the production slot's Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetConnectionGatewaySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetConnectionGatewaySlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - public static VnetGateway CreateOrUpdateVnetConnectionGatewaySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot) - { - return operations.CreateOrUpdateVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateVnetConnectionGatewaySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - public static VnetGateway UpdateVnetConnectionGatewaySlot(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot) - { - return operations.UpdateVnetConnectionGatewaySlotAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will add - /// or update a gateway for the production slot's Virtual Network. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetConnectionGatewaySlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetConnectionGatewaySlotWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static IPage ListWebJobsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.ListWebJobsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebJobsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebJobsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - public static WebJob GetWebJobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot) - { - return operations.GetWebJobSlotAsync(resourceGroupName, name, webJobName, slot).GetAwaiter().GetResult(); - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API returns - /// deployments for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task GetWebJobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebJobSlotWithHttpMessagesAsync(resourceGroupName, name, webJobName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - public static IPage ListSlotDifferencesFromProduction(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity) - { - return operations.ListSlotDifferencesFromProductionAsync(resourceGroupName, name, slotSwapEntity).GetAwaiter().GetResult(); - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotDifferencesFromProductionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotDifferencesFromProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - public static void SwapSlotWithProduction(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity) - { - operations.SwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).GetAwaiter().GetResult(); - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The cancellation token. - /// - public static async Task SwapSlotWithProductionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - public static IPage ListSnapshots(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSnapshotsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - public static IPage ListSnapshotsFromDRSecondary(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListSnapshotsFromDRSecondaryAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Website Name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsFromDRSecondaryAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsFromDRSecondaryWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static SiteSourceControl GetSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.GetSourceControlAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the source control configuration of an app. - /// - /// - /// Description for Gets the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task GetSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSourceControlWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - public static SiteSourceControl CreateOrUpdateSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl) - { - return operations.CreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - public static void DeleteSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name, string additionalFlags = default(string)) - { - operations.DeleteSourceControlAsync(resourceGroupName, name, additionalFlags).GetAwaiter().GetResult(); - } - - /// - /// Deletes the source control configuration of an app. - /// - /// - /// Description for Deletes the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task DeleteSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string additionalFlags = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteSourceControlWithHttpMessagesAsync(resourceGroupName, name, additionalFlags, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - public static SiteSourceControl UpdateSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl) - { - return operations.UpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void Start(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.StartAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Starts an app (or deployment slot, if specified). - /// - /// - /// Description for Starts an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task StartAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StartWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList StartNetworkTrace(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.StartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> StartNetworkTraceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.StartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void Stop(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.StopAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Stops an app (or deployment slot, if specified). - /// - /// - /// Description for Stops an app (or deployment slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task StopAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - public static void StopNetworkTrace(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.StopNetworkTraceAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Stop ongoing capturing network packets for the site. - /// - /// - /// Description for Stop ongoing capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The cancellation token. - /// - public static async Task StopNetworkTraceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.StopNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - public static void SyncRepository(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.SyncRepositoryAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Sync web app repository. - /// - /// - /// Description for Sync web app repository. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// The cancellation token. - /// - public static async Task SyncRepositoryAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncRepositoryWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static void SyncFunctionTriggers(this IWebAppsOperations operations, string resourceGroupName, string name) - { - operations.SyncFunctionTriggersAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Syncs function trigger metadata to the management database - /// - /// - /// Description for Syncs function trigger metadata to the management database - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task SyncFunctionTriggersAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.SyncFunctionTriggersWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListTriggeredWebJobs(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListTriggeredWebJobsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static TriggeredWebJob GetTriggeredWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - return operations.GetTriggeredWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Gets a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Gets a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task GetTriggeredWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetTriggeredWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static void DeleteTriggeredWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - operations.DeleteTriggeredWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Delete a triggered web job by its ID for an app, or a deployment slot. - /// - /// - /// Description for Delete a triggered web job by its ID for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteTriggeredWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteTriggeredWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static IPage ListTriggeredWebJobHistory(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - return operations.ListTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobHistoryAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobHistoryWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - public static TriggeredJobHistory GetTriggeredWebJobHistory(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string id) - { - return operations.GetTriggeredWebJobHistoryAsync(resourceGroupName, name, webJobName, id).GetAwaiter().GetResult(); - } - - /// - /// Gets a triggered web job's history by its ID for an app, , or a deployment - /// slot. - /// - /// - /// Description for Gets a triggered web job's history by its ID for an app, , - /// or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// History ID. - /// - /// - /// The cancellation token. - /// - public static async Task GetTriggeredWebJobHistoryAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, string id, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetTriggeredWebJobHistoryWithHttpMessagesAsync(resourceGroupName, name, webJobName, id, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - public static void RunTriggeredWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - operations.RunTriggeredWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Run a triggered web job for an app, or a deployment slot. - /// - /// - /// Description for Run a triggered web job for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of Web Job. - /// - /// - /// The cancellation token. - /// - public static async Task RunTriggeredWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.RunTriggeredWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - public static IPage ListUsages(this IWebAppsOperations operations, string resourceGroupName, string name, string filter = default(string)) - { - return operations.ListUsagesAsync(resourceGroupName, name, filter).GetAwaiter().GetResult(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Return only information specified in the filter (using OData syntax). For - /// example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and - /// startTime eq 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and - /// timeGrain eq duration'[Hour|Minute|Day]'. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string filter = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesWithHttpMessagesAsync(resourceGroupName, name, filter, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static IList ListVnetConnections(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListVnetConnectionsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the virtual networks the app (or deployment slot) is connected to. - /// - /// - /// Description for Gets the virtual networks the app (or deployment slot) is - /// connected to. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task> ListVnetConnectionsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListVnetConnectionsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - public static VnetInfoResource GetVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName) - { - return operations.GetVnetConnectionAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); - } - - /// - /// Gets a virtual network the app (or deployment slot) is connected to by - /// name. - /// - /// - /// Description for Gets a virtual network the app (or deployment slot) is - /// connected to by name. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - public static VnetInfoResource CreateOrUpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope) - { - return operations.CreateOrUpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - public static void DeleteVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName) - { - operations.DeleteVnetConnectionAsync(resourceGroupName, name, vnetName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a connection from an app (or deployment slot to a named virtual - /// network. - /// - /// - /// Description for Deletes a connection from an app (or deployment slot to a - /// named virtual network. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the virtual network. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - public static VnetInfoResource UpdateVnetConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope) - { - return operations.UpdateVnetConnectionAsync(resourceGroupName, name, vnetName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Adds a Virtual Network connection to an app or slot (PUT) or updates the - /// connection properties (PATCH). - /// - /// - /// Description for Adds a Virtual Network connection to an app or slot (PUT) - /// or updates the connection properties (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of an existing Virtual Network. - /// - /// - /// Properties of the Virtual Network connection. See example. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, VnetInfoResource connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetConnectionWithHttpMessagesAsync(resourceGroupName, name, vnetName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - public static VnetGateway GetVnetConnectionGateway(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName) - { - return operations.GetVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName).GetAwaiter().GetResult(); - } - - /// - /// Gets an app's Virtual Network gateway. - /// - /// - /// Description for Gets an app's Virtual Network gateway. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The cancellation token. - /// - public static async Task GetVnetConnectionGatewayAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetVnetConnectionGatewayWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - public static VnetGateway CreateOrUpdateVnetConnectionGateway(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope) - { - return operations.CreateOrUpdateVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateVnetConnectionGatewayAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateVnetConnectionGatewayWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - public static VnetGateway UpdateVnetConnectionGateway(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope) - { - return operations.UpdateVnetConnectionGatewayAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Adds a gateway to a connected Virtual Network (PUT) or updates it (PATCH). - /// - /// - /// Description for Adds a gateway to a connected Virtual Network (PUT) or - /// updates it (PATCH). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the Virtual Network. - /// - /// - /// Name of the gateway. Currently, the only supported string is "primary". - /// - /// - /// The properties to update this gateway with. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateVnetConnectionGatewayAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string vnetName, string gatewayName, VnetGateway connectionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateVnetConnectionGatewayWithHttpMessagesAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - public static IPage ListWebJobs(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.ListWebJobsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebJobsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebJobsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - public static WebJob GetWebJob(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName) - { - return operations.GetWebJobAsync(resourceGroupName, name, webJobName).GetAwaiter().GetResult(); - } - - /// - /// Get webjob information for an app, or a deployment slot. - /// - /// - /// Description for Get webjob information for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Name of the web job. - /// - /// - /// The cancellation token. - /// - public static async Task GetWebJobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string webJobName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWebJobWithHttpMessagesAsync(resourceGroupName, name, webJobName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - public static Site BeginCreateOrUpdate(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, name, siteEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - public static void BeginRestore(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request) - { - operations.BeginRestoreAsync(resourceGroupName, name, backupId, request).GetAwaiter().GetResult(); - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreWithHttpMessagesAsync(resourceGroupName, name, backupId, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - public static User BeginListPublishingCredentials(this IWebAppsOperations operations, string resourceGroupName, string name) - { - return operations.BeginListPublishingCredentialsAsync(resourceGroupName, name).GetAwaiter().GetResult(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// The cancellation token. - /// - public static async Task BeginListPublishingCredentialsAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginListPublishingCredentialsWithHttpMessagesAsync(resourceGroupName, name, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus BeginCreateMSDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name, MSDeploy mSDeploy) - { - return operations.BeginCreateMSDeployOperationAsync(resourceGroupName, name, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateMSDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - public static FunctionEnvelope BeginCreateFunction(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope) - { - return operations.BeginCreateFunctionAsync(resourceGroupName, name, functionName, functionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Function details. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateFunctionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, FunctionEnvelope functionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateFunctionWithHttpMessagesAsync(resourceGroupName, name, functionName, functionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus BeginCreateInstanceMSDeployOperation(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy) - { - return operations.BeginCreateInstanceMSDeployOperationAsync(resourceGroupName, name, instanceId, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateInstanceMSDeployOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string instanceId, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateInstanceMSDeployOperationWithHttpMessagesAsync(resourceGroupName, name, instanceId, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - public static StorageMigrationResponse BeginMigrateStorage(this IWebAppsOperations operations, string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions) - { - return operations.BeginMigrateStorageAsync(subscriptionName, resourceGroupName, name, migrationOptions).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app. - /// - /// - /// Description for Restores a web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure subscription. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Migration migrationOptions. - /// - /// - /// The cancellation token. - /// - public static async Task BeginMigrateStorageAsync(this IWebAppsOperations operations, string subscriptionName, string resourceGroupName, string name, StorageMigrationOptions migrationOptions, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginMigrateStorageWithHttpMessagesAsync(subscriptionName, resourceGroupName, name, migrationOptions, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - public static Operation BeginMigrateMySql(this IWebAppsOperations operations, string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope) - { - return operations.BeginMigrateMySqlAsync(resourceGroupName, name, migrationRequestEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Migrates a local (in-app) MySql database to a remote MySql database. - /// - /// - /// Description for Migrates a local (in-app) MySql database to a remote MySql - /// database. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// MySql migration options. - /// - /// - /// The cancellation token. - /// - public static async Task BeginMigrateMySqlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, MigrateMySqlRequest migrationRequestEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginMigrateMySqlWithHttpMessagesAsync(resourceGroupName, name, migrationRequestEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList BeginStartWebSiteNetworkTraceOperation(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.BeginStartWebSiteNetworkTraceOperationAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginStartWebSiteNetworkTraceOperationAsync(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStartWebSiteNetworkTraceOperationWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper) - { - return operations.BeginApproveOrRejectPrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginApproveOrRejectPrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - public static object BeginDeletePrivateEndpointConnection(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName) - { - return operations.BeginDeletePrivateEndpointConnectionAsync(resourceGroupName, name, privateEndpointConnectionName).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeletePrivateEndpointConnectionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeletePrivateEndpointConnectionWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - public static void BeginRestoreFromBackupBlob(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request) - { - operations.BeginRestoreFromBackupBlobAsync(resourceGroupName, name, request).GetAwaiter().GetResult(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreFromBackupBlobAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreFromBackupBlobWithHttpMessagesAsync(resourceGroupName, name, request, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - public static void BeginRestoreFromDeletedApp(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest) - { - operations.BeginRestoreFromDeletedAppAsync(resourceGroupName, name, restoreRequest).GetAwaiter().GetResult(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreFromDeletedAppAsync(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreFromDeletedAppWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - public static void BeginRestoreSnapshot(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest) - { - operations.BeginRestoreSnapshotAsync(resourceGroupName, name, restoreRequest).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreSnapshotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreSnapshotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - public static SiteExtensionInfo BeginInstallSiteExtension(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId) - { - return operations.BeginInstallSiteExtensionAsync(resourceGroupName, name, siteExtensionId).GetAwaiter().GetResult(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// The cancellation token. - /// - public static async Task BeginInstallSiteExtensionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginInstallSiteExtensionWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - public static Site BeginCreateOrUpdateSlot(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, string slot) - { - return operations.BeginCreateOrUpdateSlotAsync(resourceGroupName, name, siteEnvelope, slot).GetAwaiter().GetResult(); - } - - /// - /// Creates a new web, mobile, or API app in an existing resource group, or - /// updates an existing app. - /// - /// - /// Description for Creates a new web, mobile, or API app in an existing - /// resource group, or updates an existing app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Unique name of the app to create or update. To create or update a - /// deployment slot, use the {slot} parameter. - /// - /// - /// A JSON representation of the app properties. See example. - /// - /// - /// Name of the deployment slot to create or update. By default, this API - /// attempts to create or modify the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, Site siteEnvelope, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateSlotWithHttpMessagesAsync(resourceGroupName, name, siteEnvelope, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - public static void BeginRestoreSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, string slot) - { - operations.BeginRestoreSlotAsync(resourceGroupName, name, backupId, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a specific backup to another app (or deployment slot, if - /// specified). - /// - /// - /// Description for Restores a specific backup to another app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// ID of the backup. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string backupId, RestoreRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreSlotWithHttpMessagesAsync(resourceGroupName, name, backupId, request, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - public static User BeginListPublishingCredentialsSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot) - { - return operations.BeginListPublishingCredentialsSlotAsync(resourceGroupName, name, slot).GetAwaiter().GetResult(); - } - - /// - /// Gets the Git/FTP publishing credentials of an app. - /// - /// - /// Description for Gets the Git/FTP publishing credentials of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will get - /// the publishing credentials for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginListPublishingCredentialsSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginListPublishingCredentialsSlotWithHttpMessagesAsync(resourceGroupName, name, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus BeginCreateMSDeployOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, MSDeploy mSDeploy) - { - return operations.BeginCreateMSDeployOperationSlotAsync(resourceGroupName, name, slot, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateMSDeployOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - public static FunctionEnvelope BeginCreateInstanceFunctionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope) - { - return operations.BeginCreateInstanceFunctionSlotAsync(resourceGroupName, name, functionName, slot, functionEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Create function for web site, or a deployment slot. - /// - /// - /// Description for Create function for web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Function name. - /// - /// - /// Name of the deployment slot. - /// - /// - /// Function details. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateInstanceFunctionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string functionName, string slot, FunctionEnvelope functionEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateInstanceFunctionSlotWithHttpMessagesAsync(resourceGroupName, name, functionName, slot, functionEnvelope, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - public static MSDeployStatus BeginCreateInstanceMSDeployOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy) - { - return operations.BeginCreateInstanceMSDeployOperationSlotAsync(resourceGroupName, name, slot, instanceId, mSDeploy).GetAwaiter().GetResult(); - } - - /// - /// Invoke the MSDeploy web app extension. - /// - /// - /// Description for Invoke the MSDeploy web app extension. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// ID of web app instance. - /// - /// - /// Details of MSDeploy operation - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateInstanceMSDeployOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, string instanceId, MSDeploy mSDeploy, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateInstanceMSDeployOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, instanceId, mSDeploy, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList BeginStartWebSiteNetworkTraceOperationSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.BeginStartWebSiteNetworkTraceOperationSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginStartWebSiteNetworkTraceOperationSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStartWebSiteNetworkTraceOperationSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - public static RemotePrivateEndpointConnectionARMResource BeginApproveOrRejectPrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot) - { - return operations.BeginApproveOrRejectPrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot).GetAwaiter().GetResult(); - } - - /// - /// Approves or rejects a private endpoint connection - /// - /// - /// Description for Approves or rejects a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginApproveOrRejectPrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, PrivateLinkConnectionApprovalRequestResource privateEndpointWrapper, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginApproveOrRejectPrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, privateEndpointWrapper, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - public static object BeginDeletePrivateEndpointConnectionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot) - { - return operations.BeginDeletePrivateEndpointConnectionSlotAsync(resourceGroupName, name, privateEndpointConnectionName, slot).GetAwaiter().GetResult(); - } - - /// - /// Deletes a private endpoint connection - /// - /// - /// Description for Deletes a private endpoint connection - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the site. - /// - /// - /// - /// - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeletePrivateEndpointConnectionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string privateEndpointConnectionName, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginDeletePrivateEndpointConnectionSlotWithHttpMessagesAsync(resourceGroupName, name, privateEndpointConnectionName, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - public static void BeginRestoreFromBackupBlobSlot(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot) - { - operations.BeginRestoreFromBackupBlobSlotAsync(resourceGroupName, name, request, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores an app from a backup blob in Azure Storage. - /// - /// - /// Description for Restores an app from a backup blob in Azure Storage. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// Information on restore request . - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// restore a backup of the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreFromBackupBlobSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, RestoreRequest request, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreFromBackupBlobSlotWithHttpMessagesAsync(resourceGroupName, name, request, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static void BeginRestoreFromDeletedAppSlot(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot) - { - operations.BeginRestoreFromDeletedAppSlotAsync(resourceGroupName, name, restoreRequest, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a deleted web app to this web app. - /// - /// - /// Description for Restores a deleted web app to this web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Deleted web app restore information. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreFromDeletedAppSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, DeletedAppRestoreRequest restoreRequest, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreFromDeletedAppSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - public static void BeginRestoreSnapshotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot) - { - operations.BeginRestoreSnapshotSlotAsync(resourceGroupName, name, restoreRequest, slot).GetAwaiter().GetResult(); - } - - /// - /// Restores a web app from a snapshot. - /// - /// - /// Description for Restores a web app from a snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of web app. - /// - /// - /// Snapshot restore settings. Snapshot information can be obtained by calling - /// GetDeletedSites or GetSiteSnapshots API. - /// - /// - /// Name of web app slot. If not specified then will default to production - /// slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginRestoreSnapshotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SnapshotRestoreRequest restoreRequest, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginRestoreSnapshotSlotWithHttpMessagesAsync(resourceGroupName, name, restoreRequest, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - public static SiteExtensionInfo BeginInstallSiteExtensionSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot) - { - return operations.BeginInstallSiteExtensionSlotAsync(resourceGroupName, name, siteExtensionId, slot).GetAwaiter().GetResult(); - } - - /// - /// Install site extension on a web site, or a deployment slot. - /// - /// - /// Description for Install site extension on a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Site name. - /// - /// - /// Site extension name. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API uses the - /// production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginInstallSiteExtensionSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string siteExtensionId, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginInstallSiteExtensionSlotWithHttpMessagesAsync(resourceGroupName, name, siteExtensionId, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - public static void BeginSwapSlotSlot(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot) - { - operations.BeginSwapSlotSlotAsync(resourceGroupName, name, slotSwapEntity, slot).GetAwaiter().GetResult(); - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// Name of the source slot. If a slot is not specified, the production slot is - /// used as the source slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginSwapSlotSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginSwapSlotSlotWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, slot, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - public static SiteSourceControl BeginCreateOrUpdateSourceControlSlot(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot) - { - return operations.BeginCreateOrUpdateSourceControlSlotAsync(resourceGroupName, name, siteSourceControl, slot).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// Name of the deployment slot. If a slot is not specified, the API will - /// update the source control configuration for the production slot. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateSourceControlSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, string slot, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateSourceControlSlotWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, slot, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList BeginStartNetworkTraceSlot(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.BeginStartNetworkTraceSlotAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The name of the slot for this web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginStartNetworkTraceSlotAsync(this IWebAppsOperations operations, string resourceGroupName, string name, string slot, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStartNetworkTraceSlotWithHttpMessagesAsync(resourceGroupName, name, slot, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - public static void BeginSwapSlotWithProduction(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity) - { - operations.BeginSwapSlotWithProductionAsync(resourceGroupName, name, slotSwapEntity).GetAwaiter().GetResult(); - } - - /// - /// Swaps two deployment slots of an app. - /// - /// - /// Description for Swaps two deployment slots of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON object that contains the target slot name. See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginSwapSlotWithProductionAsync(this IWebAppsOperations operations, string resourceGroupName, string name, CsmSlotEntity slotSwapEntity, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginSwapSlotWithProductionWithHttpMessagesAsync(resourceGroupName, name, slotSwapEntity, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - public static SiteSourceControl BeginCreateOrUpdateSourceControl(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl) - { - return operations.BeginCreateOrUpdateSourceControlAsync(resourceGroupName, name, siteSourceControl).GetAwaiter().GetResult(); - } - - /// - /// Updates the source control configuration of an app. - /// - /// - /// Description for Updates the source control configuration of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Name of the app. - /// - /// - /// JSON representation of a SiteSourceControl object. See example. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateSourceControlAsync(this IWebAppsOperations operations, string resourceGroupName, string name, SiteSourceControl siteSourceControl, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateSourceControlWithHttpMessagesAsync(resourceGroupName, name, siteSourceControl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - public static IList BeginStartNetworkTrace(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string)) - { - return operations.BeginStartNetworkTraceAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl).GetAwaiter().GetResult(); - } - - /// - /// Start capturing network packets for the site. - /// - /// - /// Description for Start capturing network packets for the site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// The name of the web app. - /// - /// - /// The duration to keep capturing in seconds. - /// - /// - /// The maximum frame length in bytes (Optional). - /// - /// - /// The Blob URL to store capture file. - /// - /// - /// The cancellation token. - /// - public static async Task> BeginStartNetworkTraceAsync(this IWebAppsOperations operations, string resourceGroupName, string name, int? durationInSeconds = default(int?), int? maxFrameLength = default(int?), string sasUrl = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginStartNetworkTraceWithHttpMessagesAsync(resourceGroupName, name, durationInSeconds, maxFrameLength, sasUrl, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a subscription. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get all apps for a subscription. - /// - /// - /// Description for Get all apps for a 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 IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByResourceGroupNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListByResourceGroupNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all web, mobile, and API apps in the specified resource group. - /// - /// - /// Description for Gets all web, mobile, and API apps in the specified - /// resource group. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByResourceGroupNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByResourceGroupNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBackupsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListBackupsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBackupsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBasicPublishingCredentialsPoliciesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListBasicPublishingCredentialsPoliciesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBasicPublishingCredentialsPoliciesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBasicPublishingCredentialsPoliciesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListConfigurationsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListConfigurationsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetAppSettingsKeyVaultReferencesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetAppSettingsKeyVaultReferencesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAppSettingsKeyVaultReferencesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingsKeyVaultReferencesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetSiteConnectionStringKeyVaultReferencesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetSiteConnectionStringKeyVaultReferencesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetSiteConnectionStringKeyVaultReferencesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListConfigurationSnapshotInfoNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListConfigurationSnapshotInfoNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationSnapshotInfoNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationSnapshotInfoNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListContinuousWebJobsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListContinuousWebJobsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListContinuousWebJobsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListContinuousWebJobsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListDeploymentsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListDeploymentsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDeploymentsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListDomainOwnershipIdentifiersNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListDomainOwnershipIdentifiersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDomainOwnershipIdentifiersNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDomainOwnershipIdentifiersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListFunctionsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListFunctionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListFunctionsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListFunctionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHostNameBindingsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListHostNameBindingsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostNameBindingsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostNameBindingsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceIdentifiersNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceIdentifiersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceIdentifiersNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceIdentifiersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessModulesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessModulesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessModulesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessModulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessThreadsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessThreadsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessThreadsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessThreadsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteBackupsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSiteBackupsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteBackupsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteBackupsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListPerfMonCountersNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListPerfMonCountersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPerfMonCountersNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPerfMonCountersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetPrivateEndpointConnectionListNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetPrivateEndpointConnectionListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessModulesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessModulesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessModulesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessModulesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessThreadsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessThreadsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessThreadsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessThreadsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListPublicCertificatesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListPublicCertificatesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPublicCertificatesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublicCertificatesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteExtensionsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSiteExtensionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteExtensionsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteExtensionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSlotsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSlotsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets an app's deployment slots. - /// - /// - /// Description for Gets an app's deployment slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBackupsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListBackupsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBackupsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBackupsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBasicPublishingCredentialsPoliciesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListBasicPublishingCredentialsPoliciesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns whether Scm basic auth is allowed and whether Ftp is allowed for a - /// given site. - /// - /// - /// Description for Returns whether Scm basic auth is allowed and whether Ftp - /// is allowed for a given site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBasicPublishingCredentialsPoliciesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBasicPublishingCredentialsPoliciesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListConfigurationsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListConfigurationsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the configurations of an app - /// - /// - /// Description for List the configurations of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetAppSettingsKeyVaultReferencesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetAppSettingsKeyVaultReferencesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetAppSettingsKeyVaultReferencesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetAppSettingsKeyVaultReferencesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetSiteConnectionStringKeyVaultReferencesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetSiteConnectionStringKeyVaultReferencesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the config reference app settings and status of an app - /// - /// - /// Description for Gets the config reference app settings and status of an app - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetSiteConnectionStringKeyVaultReferencesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSiteConnectionStringKeyVaultReferencesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListConfigurationSnapshotInfoSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListConfigurationSnapshotInfoSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of web app configuration snapshots identifiers. Each element of - /// the list contains a timestamp and the ID of the snapshot. - /// - /// - /// Description for Gets a list of web app configuration snapshots identifiers. - /// Each element of the list contains a timestamp and the ID of the snapshot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListConfigurationSnapshotInfoSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListConfigurationSnapshotInfoSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListContinuousWebJobsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListContinuousWebJobsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List continuous web jobs for an app, or a deployment slot. - /// - /// - /// Description for List continuous web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListContinuousWebJobsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListContinuousWebJobsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListDeploymentsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListDeploymentsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List deployments for an app, or a deployment slot. - /// - /// - /// Description for List deployments for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDeploymentsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDeploymentsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListDomainOwnershipIdentifiersSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListDomainOwnershipIdentifiersSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Lists ownership identifiers for domain associated with web app. - /// - /// - /// Description for Lists ownership identifiers for domain associated with web - /// app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListDomainOwnershipIdentifiersSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListDomainOwnershipIdentifiersSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceFunctionsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceFunctionsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the functions for a web site, or a deployment slot. - /// - /// - /// Description for List the functions for a web site, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceFunctionsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceFunctionsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListHostNameBindingsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListHostNameBindingsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get hostname bindings for an app or a deployment slot. - /// - /// - /// Description for Get hostname bindings for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListHostNameBindingsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListHostNameBindingsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceIdentifiersSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceIdentifiersSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets all scale-out instances of an app. - /// - /// - /// Description for Gets all scale-out instances of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceIdentifiersSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceIdentifiersSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessModulesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessModulesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessModulesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessModulesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListInstanceProcessThreadsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListInstanceProcessThreadsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListInstanceProcessThreadsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListInstanceProcessThreadsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteBackupsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSiteBackupsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets existing backups of an app. - /// - /// - /// Description for Gets existing backups of an app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteBackupsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteBackupsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListPerfMonCountersSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListPerfMonCountersSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets perfmon counters for web app. - /// - /// - /// Description for Gets perfmon counters for web app. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPerfMonCountersSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPerfMonCountersSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage GetPrivateEndpointConnectionListSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.GetPrivateEndpointConnectionListSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the list of private endpoint connections associated with a site - /// - /// - /// Description for Gets the list of private endpoint connections associated - /// with a site - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> GetPrivateEndpointConnectionListSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPrivateEndpointConnectionListSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of processes for a web site, or a deployment slot, or for a - /// specific scaled-out instance in a web site. - /// - /// - /// Description for Get list of processes for a web site, or a deployment slot, - /// or for a specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessModulesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessModulesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List module information for a process by its ID for a specific scaled-out - /// instance in a web site. - /// - /// - /// Description for List module information for a process by its ID for a - /// specific scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessModulesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessModulesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListProcessThreadsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListProcessThreadsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List the threads in a process by its ID for a specific scaled-out instance - /// in a web site. - /// - /// - /// Description for List the threads in a process by its ID for a specific - /// scaled-out instance in a web site. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListProcessThreadsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListProcessThreadsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListPublicCertificatesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListPublicCertificatesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get public certificates for an app or a deployment slot. - /// - /// - /// Description for Get public certificates for an app or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPublicCertificatesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPublicCertificatesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteExtensionsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSiteExtensionsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get list of siteextensions for a web site, or a deployment slot. - /// - /// - /// Description for Get list of siteextensions for a web site, or a deployment - /// slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteExtensionsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteExtensionsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSlotDifferencesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSlotDifferencesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotDifferencesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotDifferencesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSnapshotsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSnapshotsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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> ListSnapshotsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSnapshotsFromDRSecondarySlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSnapshotsFromDRSecondarySlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsFromDRSecondarySlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsFromDRSecondarySlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListTriggeredWebJobsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListTriggeredWebJobsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListTriggeredWebJobHistorySlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListTriggeredWebJobHistorySlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobHistorySlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobHistorySlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListUsagesSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListUsagesSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebJobsSlotNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListWebJobsSlotNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebJobsSlotNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebJobsSlotNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSlotDifferencesFromProductionNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSlotDifferencesFromProductionNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get the difference in configuration settings between two web app slots. - /// - /// - /// Description for Get the difference in configuration settings between two - /// web app slots. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSlotDifferencesFromProductionNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSlotDifferencesFromProductionNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the user. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSnapshotsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSnapshotsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user. - /// - /// - /// Description for Returns all Snapshots to the 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> ListSnapshotsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSnapshotsFromDRSecondaryNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListSnapshotsFromDRSecondaryNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Returns all Snapshots to the user from DRSecondary endpoint. - /// - /// - /// Description for Returns all Snapshots to the user from DRSecondary - /// endpoint. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSnapshotsFromDRSecondaryNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSnapshotsFromDRSecondaryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListTriggeredWebJobsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListTriggeredWebJobsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List triggered web jobs for an app, or a deployment slot. - /// - /// - /// Description for List triggered web jobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListTriggeredWebJobHistoryNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListTriggeredWebJobHistoryNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List a triggered web job's history for an app, or a deployment slot. - /// - /// - /// Description for List a triggered web job's history for an app, or a - /// deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListTriggeredWebJobHistoryNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListTriggeredWebJobHistoryNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListUsagesNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListUsagesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the quota usage information of an app (or deployment slot, if - /// specified). - /// - /// - /// Description for Gets the quota usage information of an app (or deployment - /// slot, if specified). - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListUsagesNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListUsagesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListWebJobsNext(this IWebAppsOperations operations, string nextPageLink) - { - return operations.ListWebJobsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List webjobs for an app, or a deployment slot. - /// - /// - /// Description for List webjobs for an app, or a deployment slot. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListWebJobsNextAsync(this IWebAppsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWebJobsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs deleted file mode 100644 index 68cf93c515dc..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClient.cs +++ /dev/null @@ -1,4716 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - 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; - using System.Threading; - using System.Threading.Tasks; - - /// - /// WebSite Management Client - /// - public partial class WebSiteManagementClient : ServiceClient, IWebSiteManagementClient, 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; } - - /// - /// Your Azure subscription ID. This is a GUID-formatted string (e.g. - /// 00000000-0000-0000-0000-000000000000). - /// - public string SubscriptionId { get; set; } - - /// - /// API Version - /// - public string ApiVersion { get; private set; } - - /// - /// The preferred language for the response. - /// - public string AcceptLanguage { get; set; } - - /// - /// The retry timeout in seconds for Long Running Operations. Default value is - /// 30. - /// - public int? LongRunningOperationRetryTimeout { get; set; } - - /// - /// Whether a unique x-ms-client-request-id should be generated. When set to - /// true a unique x-ms-client-request-id value is generated and included in - /// each request. Default is true. - /// - public bool? GenerateClientRequestId { get; set; } - - /// - /// Gets the IAppServiceCertificateOrdersOperations. - /// - public virtual IAppServiceCertificateOrdersOperations AppServiceCertificateOrders { get; private set; } - - /// - /// Gets the ICertificateOrdersDiagnosticsOperations. - /// - public virtual ICertificateOrdersDiagnosticsOperations CertificateOrdersDiagnostics { get; private set; } - - /// - /// Gets the ICertificateRegistrationProviderOperations. - /// - public virtual ICertificateRegistrationProviderOperations CertificateRegistrationProvider { get; private set; } - - /// - /// Gets the IDomainsOperations. - /// - public virtual IDomainsOperations Domains { get; private set; } - - /// - /// Gets the ITopLevelDomainsOperations. - /// - public virtual ITopLevelDomainsOperations TopLevelDomains { get; private set; } - - /// - /// Gets the IDomainRegistrationProviderOperations. - /// - public virtual IDomainRegistrationProviderOperations DomainRegistrationProvider { get; private set; } - - /// - /// Gets the IAppServiceEnvironmentsOperations. - /// - public virtual IAppServiceEnvironmentsOperations AppServiceEnvironments { get; private set; } - - /// - /// Gets the IAppServicePlansOperations. - /// - public virtual IAppServicePlansOperations AppServicePlans { get; private set; } - - /// - /// Gets the ICertificatesOperations. - /// - public virtual ICertificatesOperations Certificates { get; private set; } - - /// - /// Gets the IContainerAppsOperations. - /// - public virtual IContainerAppsOperations ContainerApps { get; private set; } - - /// - /// Gets the IContainerAppsRevisionsOperations. - /// - public virtual IContainerAppsRevisionsOperations ContainerAppsRevisions { get; private set; } - - /// - /// Gets the IDeletedWebAppsOperations. - /// - public virtual IDeletedWebAppsOperations DeletedWebApps { get; private set; } - - /// - /// Gets the IDiagnosticsOperations. - /// - public virtual IDiagnosticsOperations Diagnostics { get; private set; } - - /// - /// Gets the IGlobalModelOperations. - /// - public virtual IGlobalModelOperations GlobalModel { get; private set; } - - /// - /// Gets the IKubeEnvironmentsOperations. - /// - public virtual IKubeEnvironmentsOperations KubeEnvironments { get; private set; } - - /// - /// Gets the IProviderOperations. - /// - public virtual IProviderOperations Provider { get; private set; } - - /// - /// Gets the IRecommendationsOperations. - /// - public virtual IRecommendationsOperations Recommendations { get; private set; } - - /// - /// Gets the IResourceHealthMetadataOperations. - /// - public virtual IResourceHealthMetadataOperations ResourceHealthMetadata { get; private set; } - - /// - /// Gets the IStaticSitesOperations. - /// - public virtual IStaticSitesOperations StaticSites { get; private set; } - - /// - /// Gets the IWebAppsOperations. - /// - public virtual IWebAppsOperations WebApps { get; private set; } - - /// - /// Initializes a new instance of the WebSiteManagementClient class. - /// - /// - /// HttpClient to be used - /// - /// - /// True: will dispose the provided httpClient on calling WebSiteManagementClient.Dispose(). False: will not dispose provided httpClient - protected WebSiteManagementClient(HttpClient httpClient, bool disposeHttpClient) : base(httpClient, disposeHttpClient) - { - Initialize(); - } - - /// - /// Initializes a new instance of the WebSiteManagementClient class. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - protected WebSiteManagementClient(params DelegatingHandler[] handlers) : base(handlers) - { - Initialize(); - } - - /// - /// Initializes a new instance of the WebSiteManagementClient class. - /// - /// - /// Optional. The http client handler used to handle http transport. - /// - /// - /// Optional. The delegating handlers to add to the http client pipeline. - /// - protected WebSiteManagementClient(HttpClientHandler rootHandler, params DelegatingHandler[] handlers) : base(rootHandler, handlers) - { - Initialize(); - } - - /// - /// Initializes a new instance of the WebSiteManagementClient 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 WebSiteManagementClient(System.Uri baseUri, params DelegatingHandler[] handlers) : this(handlers) - { - if (baseUri == null) - { - throw new System.ArgumentNullException("baseUri"); - } - BaseUri = baseUri; - } - - /// - /// Initializes a new instance of the WebSiteManagementClient 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 WebSiteManagementClient(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 WebSiteManagementClient 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 WebSiteManagementClient(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 WebSiteManagementClient class. - /// - /// - /// Required. Credentials needed for the client to connect to Azure. - /// - /// - /// HttpClient to be used - /// - /// - /// True: will dispose the provided httpClient on calling WebSiteManagementClient.Dispose(). False: will not dispose provided httpClient - /// - /// Thrown when a required parameter is null - /// - public WebSiteManagementClient(ServiceClientCredentials credentials, HttpClient httpClient, bool disposeHttpClient) : this(httpClient, disposeHttpClient) - { - if (credentials == null) - { - throw new System.ArgumentNullException("credentials"); - } - Credentials = credentials; - if (Credentials != null) - { - Credentials.InitializeServiceClient(this); - } - } - - /// - /// Initializes a new instance of the WebSiteManagementClient 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 WebSiteManagementClient(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 WebSiteManagementClient 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 WebSiteManagementClient(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 WebSiteManagementClient 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 WebSiteManagementClient(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() - { - AppServiceCertificateOrders = new AppServiceCertificateOrdersOperations(this); - CertificateOrdersDiagnostics = new CertificateOrdersDiagnosticsOperations(this); - CertificateRegistrationProvider = new CertificateRegistrationProviderOperations(this); - Domains = new DomainsOperations(this); - TopLevelDomains = new TopLevelDomainsOperations(this); - DomainRegistrationProvider = new DomainRegistrationProviderOperations(this); - AppServiceEnvironments = new AppServiceEnvironmentsOperations(this); - AppServicePlans = new AppServicePlansOperations(this); - Certificates = new CertificatesOperations(this); - ContainerApps = new ContainerAppsOperations(this); - ContainerAppsRevisions = new ContainerAppsRevisionsOperations(this); - DeletedWebApps = new DeletedWebAppsOperations(this); - Diagnostics = new DiagnosticsOperations(this); - GlobalModel = new GlobalModelOperations(this); - KubeEnvironments = new KubeEnvironmentsOperations(this); - Provider = new ProviderOperations(this); - Recommendations = new RecommendationsOperations(this); - ResourceHealthMetadata = new ResourceHealthMetadataOperations(this); - StaticSites = new StaticSitesOperations(this); - WebApps = new WebAppsOperations(this); - BaseUri = new System.Uri("https://management.azure.com"); - ApiVersion = "2021-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()); - } - /// - /// Gets publishing user - /// - /// - /// Description for Gets publishing user - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetPublishingUserWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "GetPublishingUser", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/publishingUsers/web").ToString(); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 publishing user - /// - /// - /// Description for Updates publishing user - /// - /// - /// Details of publishing user - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdatePublishingUserWithHttpMessagesAsync(User userDetails, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (userDetails == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "userDetails"); - } - if (userDetails != null) - { - userDetails.Validate(); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("userDetails", userDetails); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdatePublishingUser", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/publishingUsers/web").ToString(); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(userDetails != null) - { - _requestContent = SafeJsonConvert.SerializeObject(userDetails, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSourceControlsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "ListSourceControls", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols").ToString(); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 source control token - /// - /// - /// Description for Gets source control token - /// - /// - /// Type of source control - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSourceControlWithHttpMessagesAsync(string sourceControlType, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (sourceControlType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlType"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("sourceControlType", sourceControlType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetSourceControl", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols/{sourceControlType}").ToString(); - _url = _url.Replace("{sourceControlType}", System.Uri.EscapeDataString(sourceControlType)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 source control token - /// - /// - /// Description for Updates source control token - /// - /// - /// Type of source control - /// - /// - /// Source control token information - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> UpdateSourceControlWithHttpMessagesAsync(string sourceControlType, SourceControl requestMessage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (sourceControlType == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "sourceControlType"); - } - if (requestMessage == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "requestMessage"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("sourceControlType", sourceControlType); - tracingParameters.Add("requestMessage", requestMessage); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "UpdateSourceControl", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Web/sourcecontrols/{sourceControlType}").ToString(); - _url = _url.Replace("{sourceControlType}", System.Uri.EscapeDataString(sourceControlType)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(requestMessage != null) - { - _requestContent = SafeJsonConvert.SerializeObject(requestMessage, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// Azure Location of billable resource - /// - /// - /// App Service OS type meters used for - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListBillingMetersWithHttpMessagesAsync(string billingLocation = default(string), string osType = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("billingLocation", billingLocation); - tracingParameters.Add("osType", osType); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListBillingMeters", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (billingLocation != null) - { - _queryParameters.Add(string.Format("billingLocation={0}", System.Uri.EscapeDataString(billingLocation))); - } - if (osType != null) - { - _queryParameters.Add(string.Format("osType={0}", System.Uri.EscapeDataString(osType))); - } - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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; - } - - /// - /// Check if a resource name is available. - /// - /// - /// Description for Check if a resource name is available. - /// - /// - /// Resource name to verify. - /// - /// - /// Resource type used for verification. Possible values include: 'Site', - /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', - /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - /// - /// Is fully qualified domain name. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> CheckNameAvailabilityWithHttpMessagesAsync(string name, string type, bool? isFqdn = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - if (name == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "name"); - } - if (type == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "type"); - } - ResourceNameAvailabilityRequest request = new ResourceNameAvailabilityRequest(); - if (name != null || type != null || isFqdn != null) - { - request.Name = name; - request.Type = type; - request.IsFqdn = isFqdn; - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("request", request); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "CheckNameAvailability", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(request != null) - { - _requestContent = SafeJsonConvert.SerializeObject(request, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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 custom hostnames under this 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>> ListCustomHostNameSitesWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "ListCustomHostNameSites", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/customhostnameSites").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 list of available geo regions plus ministamps - /// - /// - /// Description for Gets list of available geo regions plus ministamps - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> GetSubscriptionDeploymentLocationsWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "GetSubscriptionDeploymentLocations", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// Name of SKU used to filter the regions. Possible values include: 'Free', - /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', - /// 'ElasticPremium', 'ElasticIsolated' - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Xenon workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux Consumption Workers. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListGeoRegionsWithHttpMessagesAsync(string sku = default(string), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("sku", sku); - tracingParameters.Add("linuxWorkersEnabled", linuxWorkersEnabled); - tracingParameters.Add("xenonWorkersEnabled", xenonWorkersEnabled); - tracingParameters.Add("linuxDynamicWorkersEnabled", linuxDynamicWorkersEnabled); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListGeoRegions", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/geoRegions").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (sku != null) - { - _queryParameters.Add(string.Format("sku={0}", System.Uri.EscapeDataString(sku))); - } - if (linuxWorkersEnabled != null) - { - _queryParameters.Add(string.Format("linuxWorkersEnabled={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(linuxWorkersEnabled, SerializationSettings).Trim('"')))); - } - if (xenonWorkersEnabled != null) - { - _queryParameters.Add(string.Format("xenonWorkersEnabled={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(xenonWorkersEnabled, SerializationSettings).Trim('"')))); - } - if (linuxDynamicWorkersEnabled != null) - { - _queryParameters.Add(string.Format("linuxDynamicWorkersEnabled={0}", System.Uri.EscapeDataString(SafeJsonConvert.SerializeObject(linuxDynamicWorkersEnabled, SerializationSettings).Trim('"')))); - } - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// Hostname information. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListSiteIdentifiersAssignedToHostNameWithHttpMessagesAsync(NameIdentifier nameIdentifier, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nameIdentifier == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nameIdentifier"); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nameIdentifier", nameIdentifier); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListSiteIdentifiersAssignedToHostName", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/listSitesAssignedToHostName").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(nameIdentifier != null) - { - _requestContent = SafeJsonConvert.SerializeObject(nameIdentifier, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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>> ListPremierAddOnOffersWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "ListPremierAddOnOffers", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/premieraddonoffers").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 SKUs. - /// - /// - /// Description for List all SKUs. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ListSkusWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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, "ListSkus", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/skus").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Verifies if this VNET is compatible with an App Service Environment by - /// analyzing the Network Security Group rules. - /// - /// - /// Description for Verifies if this VNET is compatible with an App Service - /// Environment by analyzing the Network Security Group rules. - /// - /// - /// VNET information - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> VerifyHostingEnvironmentVnetWithHttpMessagesAsync(VnetParameters parameters, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (parameters == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "parameters"); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.ApiVersion"); - } - // 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, "VerifyHostingEnvironmentVnet", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet").ToString(); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 = SafeJsonConvert.SerializeObject(parameters, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Move resources between resource groups. - /// - /// - /// Description for Move resources between resource groups. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// 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 MoveWithHttpMessagesAsync(string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (moveResourceEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "moveResourceEnvelope"); - } - if (moveResourceEnvelope != null) - { - moveResourceEnvelope.Validate(); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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("moveResourceEnvelope", moveResourceEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Move", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(moveResourceEnvelope != null) - { - _requestContent = SafeJsonConvert.SerializeObject(moveResourceEnvelope, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Validate if a resource can be created. - /// - /// - /// Description for Validate if a resource can be created. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Request with the resources to validate. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation 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> ValidateWithHttpMessagesAsync(string resourceGroupName, ValidateRequest validateRequest, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (validateRequest == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "validateRequest"); - } - if (validateRequest != null) - { - validateRequest.Validate(); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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("validateRequest", validateRequest); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Validate", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(validateRequest != null) - { - _requestContent = SafeJsonConvert.SerializeObject(validateRequest, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Validate whether a resource can be moved. - /// - /// - /// Description for Validate whether a resource can be moved. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// 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 ValidateMoveWithHttpMessagesAsync(string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (resourceGroupName != null) - { - if (resourceGroupName.Length > 90) - { - throw new ValidationException(ValidationRules.MaxLength, "resourceGroupName", 90); - } - if (resourceGroupName.Length < 1) - { - throw new ValidationException(ValidationRules.MinLength, "resourceGroupName", 1); - } - if (!System.Text.RegularExpressions.Regex.IsMatch(resourceGroupName, "^[-\\w\\._\\(\\)]+[^\\.]$")) - { - throw new ValidationException(ValidationRules.Pattern, "resourceGroupName", "^[-\\w\\._\\(\\)]+[^\\.]$"); - } - } - if (moveResourceEnvelope == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "moveResourceEnvelope"); - } - if (moveResourceEnvelope != null) - { - moveResourceEnvelope.Validate(); - } - if (SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.SubscriptionId"); - } - if (ApiVersion == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.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("moveResourceEnvelope", moveResourceEnvelope); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ValidateMove", tracingParameters); - } - // Construct URL - var _baseUrl = BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(SubscriptionId)); - List _queryParameters = new List(); - if (ApiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(ApiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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(moveResourceEnvelope != null) - { - _requestContent = SafeJsonConvert.SerializeObject(moveResourceEnvelope, 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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; - } - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// 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>> ListSourceControlsNextWithHttpMessagesAsync(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, "ListSourceControlsNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// 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>> ListBillingMetersNextWithHttpMessagesAsync(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, "ListBillingMetersNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 custom hostnames under this 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>> ListCustomHostNameSitesNextWithHttpMessagesAsync(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, "ListCustomHostNameSitesNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// 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>> ListGeoRegionsNextWithHttpMessagesAsync(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, "ListGeoRegionsNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// 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>> ListSiteIdentifiersAssignedToHostNameNextWithHttpMessagesAsync(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, "ListSiteIdentifiersAssignedToHostNameNext", 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("POST"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, 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 premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// 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>> ListPremierAddOnOffersNextWithHttpMessagesAsync(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, "ListPremierAddOnOffersNext", 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 (GenerateClientRequestId != null && GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", 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 (Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await 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 DefaultErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - DefaultErrorResponse _errorBody = SafeJsonConvert.DeserializeObject(_responseContent, 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 = SafeJsonConvert.DeserializeObject>(_responseContent, DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs deleted file mode 100644 index 4054e381328d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Generated/WebSiteManagementClientExtensions.cs +++ /dev/null @@ -1,973 +0,0 @@ -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for -// license information. -// -// Code generated by Microsoft (R) AutoRest Code Generator. -// Changes may cause incorrect behavior and will be lost if the code is -// regenerated. -// - -namespace Microsoft.Azure.Management.WebSites -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for WebSiteManagementClient. - /// - public static partial class WebSiteManagementClientExtensions - { - /// - /// Gets publishing user - /// - /// - /// Description for Gets publishing user - /// - /// - /// The operations group for this extension method. - /// - public static User GetPublishingUser(this IWebSiteManagementClient operations) - { - return operations.GetPublishingUserAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets publishing user - /// - /// - /// Description for Gets publishing user - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task GetPublishingUserAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetPublishingUserWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates publishing user - /// - /// - /// Description for Updates publishing user - /// - /// - /// The operations group for this extension method. - /// - /// - /// Details of publishing user - /// - public static User UpdatePublishingUser(this IWebSiteManagementClient operations, User userDetails) - { - return operations.UpdatePublishingUserAsync(userDetails).GetAwaiter().GetResult(); - } - - /// - /// Updates publishing user - /// - /// - /// Description for Updates publishing user - /// - /// - /// The operations group for this extension method. - /// - /// - /// Details of publishing user - /// - /// - /// The cancellation token. - /// - public static async Task UpdatePublishingUserAsync(this IWebSiteManagementClient operations, User userDetails, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdatePublishingUserWithHttpMessagesAsync(userDetails, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListSourceControls(this IWebSiteManagementClient operations) - { - return operations.ListSourceControlsAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSourceControlsAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSourceControlsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets source control token - /// - /// - /// Description for Gets source control token - /// - /// - /// The operations group for this extension method. - /// - /// - /// Type of source control - /// - public static SourceControl GetSourceControl(this IWebSiteManagementClient operations, string sourceControlType) - { - return operations.GetSourceControlAsync(sourceControlType).GetAwaiter().GetResult(); - } - - /// - /// Gets source control token - /// - /// - /// Description for Gets source control token - /// - /// - /// The operations group for this extension method. - /// - /// - /// Type of source control - /// - /// - /// The cancellation token. - /// - public static async Task GetSourceControlAsync(this IWebSiteManagementClient operations, string sourceControlType, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSourceControlWithHttpMessagesAsync(sourceControlType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Updates source control token - /// - /// - /// Description for Updates source control token - /// - /// - /// The operations group for this extension method. - /// - /// - /// Type of source control - /// - /// - /// Source control token information - /// - public static SourceControl UpdateSourceControl(this IWebSiteManagementClient operations, string sourceControlType, SourceControl requestMessage) - { - return operations.UpdateSourceControlAsync(sourceControlType, requestMessage).GetAwaiter().GetResult(); - } - - /// - /// Updates source control token - /// - /// - /// Description for Updates source control token - /// - /// - /// The operations group for this extension method. - /// - /// - /// Type of source control - /// - /// - /// Source control token information - /// - /// - /// The cancellation token. - /// - public static async Task UpdateSourceControlAsync(this IWebSiteManagementClient operations, string sourceControlType, SourceControl requestMessage, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateSourceControlWithHttpMessagesAsync(sourceControlType, requestMessage, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure Location of billable resource - /// - /// - /// App Service OS type meters used for - /// - public static IPage ListBillingMeters(this IWebSiteManagementClient operations, string billingLocation = default(string), string osType = default(string)) - { - return operations.ListBillingMetersAsync(billingLocation, osType).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Azure Location of billable resource - /// - /// - /// App Service OS type meters used for - /// - /// - /// The cancellation token. - /// - public static async Task> ListBillingMetersAsync(this IWebSiteManagementClient operations, string billingLocation = default(string), string osType = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBillingMetersWithHttpMessagesAsync(billingLocation, osType, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Check if a resource name is available. - /// - /// - /// Description for Check if a resource name is available. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Resource name to verify. - /// - /// - /// Resource type used for verification. Possible values include: 'Site', - /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', - /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - /// - /// Is fully qualified domain name. - /// - public static ResourceNameAvailability CheckNameAvailability(this IWebSiteManagementClient operations, string name, string type, bool? isFqdn = default(bool?)) - { - return operations.CheckNameAvailabilityAsync(name, type, isFqdn).GetAwaiter().GetResult(); - } - - /// - /// Check if a resource name is available. - /// - /// - /// Description for Check if a resource name is available. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Resource name to verify. - /// - /// - /// Resource type used for verification. Possible values include: 'Site', - /// 'Slot', 'HostingEnvironment', 'PublishingUser', 'Microsoft.Web/sites', - /// 'Microsoft.Web/sites/slots', 'Microsoft.Web/hostingEnvironments', - /// 'Microsoft.Web/publishingUsers' - /// - /// - /// Is fully qualified domain name. - /// - /// - /// The cancellation token. - /// - public static async Task CheckNameAvailabilityAsync(this IWebSiteManagementClient operations, string name, string type, bool? isFqdn = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CheckNameAvailabilityWithHttpMessagesAsync(name, type, isFqdn, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get custom hostnames under this subscription - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListCustomHostNameSites(this IWebSiteManagementClient operations) - { - return operations.ListCustomHostNameSitesAsync().GetAwaiter().GetResult(); - } - - /// - /// Get custom hostnames under this subscription - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListCustomHostNameSitesAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCustomHostNameSitesWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets list of available geo regions plus ministamps - /// - /// - /// Description for Gets list of available geo regions plus ministamps - /// - /// - /// The operations group for this extension method. - /// - public static DeploymentLocations GetSubscriptionDeploymentLocations(this IWebSiteManagementClient operations) - { - return operations.GetSubscriptionDeploymentLocationsAsync().GetAwaiter().GetResult(); - } - - /// - /// Gets list of available geo regions plus ministamps - /// - /// - /// Description for Gets list of available geo regions plus ministamps - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task GetSubscriptionDeploymentLocationsAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetSubscriptionDeploymentLocationsWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of SKU used to filter the regions. Possible values include: 'Free', - /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', - /// 'ElasticPremium', 'ElasticIsolated' - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Xenon workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux Consumption Workers. - /// - public static IPage ListGeoRegions(this IWebSiteManagementClient operations, string sku = default(string), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?)) - { - return operations.ListGeoRegionsAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled).GetAwaiter().GetResult(); - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of SKU used to filter the regions. Possible values include: 'Free', - /// 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', 'Isolated', - /// 'IsolatedV2', 'PremiumV2', 'PremiumV3', 'PremiumContainer', - /// 'ElasticPremium', 'ElasticIsolated' - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Xenon workers. - /// - /// - /// Specify <code>true</code> if you want to filter to only regions - /// that support Linux Consumption Workers. - /// - /// - /// The cancellation token. - /// - public static async Task> ListGeoRegionsAsync(this IWebSiteManagementClient operations, string sku = default(string), bool? linuxWorkersEnabled = default(bool?), bool? xenonWorkersEnabled = default(bool?), bool? linuxDynamicWorkersEnabled = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListGeoRegionsWithHttpMessagesAsync(sku, linuxWorkersEnabled, xenonWorkersEnabled, linuxDynamicWorkersEnabled, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Hostname information. - /// - public static IPage ListSiteIdentifiersAssignedToHostName(this IWebSiteManagementClient operations, NameIdentifier nameIdentifier) - { - return operations.ListSiteIdentifiersAssignedToHostNameAsync(nameIdentifier).GetAwaiter().GetResult(); - } - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Hostname information. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteIdentifiersAssignedToHostNameAsync(this IWebSiteManagementClient operations, NameIdentifier nameIdentifier, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteIdentifiersAssignedToHostNameWithHttpMessagesAsync(nameIdentifier, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The operations group for this extension method. - /// - public static IPage ListPremierAddOnOffers(this IWebSiteManagementClient operations) - { - return operations.ListPremierAddOnOffersAsync().GetAwaiter().GetResult(); - } - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPremierAddOnOffersAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPremierAddOnOffersWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all SKUs. - /// - /// - /// Description for List all SKUs. - /// - /// - /// The operations group for this extension method. - /// - public static SkuInfos ListSkus(this IWebSiteManagementClient operations) - { - return operations.ListSkusAsync().GetAwaiter().GetResult(); - } - - /// - /// List all SKUs. - /// - /// - /// Description for List all SKUs. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The cancellation token. - /// - public static async Task ListSkusAsync(this IWebSiteManagementClient operations, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSkusWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Verifies if this VNET is compatible with an App Service Environment by - /// analyzing the Network Security Group rules. - /// - /// - /// Description for Verifies if this VNET is compatible with an App Service - /// Environment by analyzing the Network Security Group rules. - /// - /// - /// The operations group for this extension method. - /// - /// - /// VNET information - /// - public static VnetValidationFailureDetails VerifyHostingEnvironmentVnet(this IWebSiteManagementClient operations, VnetParameters parameters) - { - return operations.VerifyHostingEnvironmentVnetAsync(parameters).GetAwaiter().GetResult(); - } - - /// - /// Verifies if this VNET is compatible with an App Service Environment by - /// analyzing the Network Security Group rules. - /// - /// - /// Description for Verifies if this VNET is compatible with an App Service - /// Environment by analyzing the Network Security Group rules. - /// - /// - /// The operations group for this extension method. - /// - /// - /// VNET information - /// - /// - /// The cancellation token. - /// - public static async Task VerifyHostingEnvironmentVnetAsync(this IWebSiteManagementClient operations, VnetParameters parameters, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.VerifyHostingEnvironmentVnetWithHttpMessagesAsync(parameters, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Move resources between resource groups. - /// - /// - /// Description for Move resources between resource groups. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - public static void Move(this IWebSiteManagementClient operations, string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) - { - operations.MoveAsync(resourceGroupName, moveResourceEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Move resources between resource groups. - /// - /// - /// Description for Move resources between resource groups. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// The cancellation token. - /// - public static async Task MoveAsync(this IWebSiteManagementClient operations, string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.MoveWithHttpMessagesAsync(resourceGroupName, moveResourceEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Validate if a resource can be created. - /// - /// - /// Description for Validate if a resource can be created. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Request with the resources to validate. - /// - public static ValidateResponse Validate(this IWebSiteManagementClient operations, string resourceGroupName, ValidateRequest validateRequest) - { - return operations.ValidateAsync(resourceGroupName, validateRequest).GetAwaiter().GetResult(); - } - - /// - /// Validate if a resource can be created. - /// - /// - /// Description for Validate if a resource can be created. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Request with the resources to validate. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateAsync(this IWebSiteManagementClient operations, string resourceGroupName, ValidateRequest validateRequest, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ValidateWithHttpMessagesAsync(resourceGroupName, validateRequest, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Validate whether a resource can be moved. - /// - /// - /// Description for Validate whether a resource can be moved. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - public static void ValidateMove(this IWebSiteManagementClient operations, string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope) - { - operations.ValidateMoveAsync(resourceGroupName, moveResourceEnvelope).GetAwaiter().GetResult(); - } - - /// - /// Validate whether a resource can be moved. - /// - /// - /// Description for Validate whether a resource can be moved. - /// - /// - /// The operations group for this extension method. - /// - /// - /// Name of the resource group to which the resource belongs. - /// - /// - /// Object that represents the resource to move. - /// - /// - /// The cancellation token. - /// - public static async Task ValidateMoveAsync(this IWebSiteManagementClient operations, string resourceGroupName, CsmMoveResourceEnvelope moveResourceEnvelope, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.ValidateMoveWithHttpMessagesAsync(resourceGroupName, moveResourceEnvelope, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSourceControlsNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListSourceControlsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets the source controls available for Azure websites. - /// - /// - /// Description for Gets the source controls available for Azure websites. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSourceControlsNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSourceControlsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListBillingMetersNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListBillingMetersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Gets a list of meters for a given location. - /// - /// - /// Description for Gets a list of meters for a given location. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListBillingMetersNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListBillingMetersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get custom hostnames under this subscription - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListCustomHostNameSitesNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListCustomHostNameSitesNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get custom hostnames under this 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> ListCustomHostNameSitesNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListCustomHostNameSitesNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListGeoRegionsNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListGeoRegionsNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// Get a list of available geographical regions. - /// - /// - /// Description for Get a list of available geographical regions. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListGeoRegionsNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListGeoRegionsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListSiteIdentifiersAssignedToHostNameNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListSiteIdentifiersAssignedToHostNameNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all apps that are assigned to a hostname. - /// - /// - /// Description for List all apps that are assigned to a hostname. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListSiteIdentifiersAssignedToHostNameNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListSiteIdentifiersAssignedToHostNameNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListPremierAddOnOffersNext(this IWebSiteManagementClient operations, string nextPageLink) - { - return operations.ListPremierAddOnOffersNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// List all premier add-on offers. - /// - /// - /// Description for List all premier add-on offers. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListPremierAddOnOffersNextAsync(this IWebSiteManagementClient operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListPremierAddOnOffersNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj deleted file mode 100644 index 4dbfaa8c23da..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Microsoft.Azure.Management.Websites.csproj +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - Microsoft.Azure.Management.Websites - Provides website management capabilities for Microsoft Azure. - Microsoft.Azure.Management.Websites - 4.0.0 - Microsoft Azure website management;website management; - - - - $(SdkTargetFx) - - - - - - - - - \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs deleted file mode 100644 index 162cc613577f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -// 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; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Microsoft Azure Web Sites Management Library")] -[assembly: AssemblyDescription("Provides management functionality for Microsoft Azure Web Sites.")] - -[assembly: AssemblyVersion("4.0.0")] -[assembly: AssemblyFileVersion("4.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/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.cmd b/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.cmd deleted file mode 100644 index d854bf9c2c2f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.cmd +++ /dev/null @@ -1,7 +0,0 @@ -:: -:: Microsoft Azure SDK for Net - Generate library code -:: Copyright (C) Microsoft Corporation. All Rights Reserved. -:: - -@echo off -call %~dp0..\..\..\..\tools\generate.cmd web/resource-manager %* diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.ps1 b/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.ps1 deleted file mode 100644 index b5903b49f5ea..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/src/generate.ps1 +++ /dev/null @@ -1 +0,0 @@ -Start-AutoRestCodeGeneration -ResourceProvider "web/resource-manager" -AutoRestVersion "v2" \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Customizations/WebSiteCloudException.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Customizations/WebSiteCloudException.cs deleted file mode 100644 index 2167be65d8fa..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Customizations/WebSiteCloudException.cs +++ /dev/null @@ -1,143 +0,0 @@ -// 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.Collections.Generic; -using System.Net.Http; -using Microsoft.Rest.Azure; -using Newtonsoft.Json.Linq; - -namespace Microsoft.Azure.Management.WebSites -{ - /// - /// Exception thrown for any invalid response from a WebSite operation. - /// - public class WebSiteCloudException - : CloudException - { - /// - /// Gets an extended error code that is a numeric value unique to this - /// error type. For a list of extended codes, see - /// WebSiteExtendedErrorCodes. - /// - public string ExtendedErrorCode { get; protected set; } - - /// - /// Gets a template of the actual message presented to the user, with - /// place holders that are filled with information from the Parameters - /// element. - /// - public string ErrorMessageFormat { get; protected set; } - - /// - /// A container for strings that fill the place holders in the message - /// template. These strings contain information unique to the user's - /// scenario. - /// - public IList ErrorMessageArguments { get; protected set; } - - /// - /// Initializes a new instance of the WebSiteCloudException class. - /// - /// The exception message. - public WebSiteCloudException(string message) - : this(message, null) - { - } - - //public new CloudHttpRequestErrorInfo Request { get; private set; } - //public new CloudHttpResponseErrorInfo Response { get; private set; } - - /// - /// Initializes a new instance of the WebSiteCloudException class. - /// - /// The exception message. - /// Inner exception. - public WebSiteCloudException(string message, Exception innerException) - : base(message, innerException) - { - ErrorMessageArguments = new List(); - } - - //public WebSiteCloudException( - // string message, - // string code, - // Exception innerException) - // : base(message, innerException) - //{ - //} - - /// - /// Create a CloudException from a failed response. - /// - /// The HTTP request. - /// The HTTP request content. - /// The HTTP response. - /// The HTTP response content. - /// Optional inner exception. - /// A CloudException representing the failure. - public static /*new*/ CloudException CreateResourceCloudExceptionTemporaryImplementation( - HttpRequestMessage request, - string requestContent, - HttpResponseMessage response, - string responseContent, - Exception innerException = null) - { - Tuple tuple = ParseResourceProviderJsonError(responseContent); - string code = tuple.Item1; - string message = tuple.Item2; - - // Get the most descriptive message that we can - string exceptionMessage = - (code != null && message != null) ? code + ": " + message : - (message != null) ? message : - (code != null) ? code : - (responseContent != null) ? responseContent : - (response != null && response.ReasonPhrase != null) ? response.ReasonPhrase : - (response != null) ? response.StatusCode.ToString() : - new InvalidOperationException().Message; - - // Create the exception - CloudException exception = new WebSiteCloudException( - exceptionMessage, - innerException); - return exception; - - } - - private static Tuple ParseResourceProviderJsonError(string content) - { - //{"error":{"code":"InvalidResourceType","message":"The ResourceType is invalid."}} - string code = null; - string message = null; - - if (content != null) - { - try - { - JObject response = JObject.Parse(content); - if (response != null) - { - JToken error = response["error"]; - if (error != null) - { - code = (string)error["code"]; - message = (string)error["message"]; - - // target - // details: code, target, message - // innererror: trace, context - // TODO: see: Resource Group Manager API spec!!! - } - } - } - catch - { - // Ignore any and all failures - } - } - - return Tuple.Create(code, message); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/RecordedDelegatingHandler.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/RecordedDelegatingHandler.cs deleted file mode 100644 index 4cb2c93a6849..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/RecordedDelegatingHandler.cs +++ /dev/null @@ -1,90 +0,0 @@ -// 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.Net; -using System.Net.Http; -using System.Net.Http.Headers; -using System.Threading.Tasks; - -namespace WebSites.Tests.Helpers -{ - public class RecordedDelegatingHandler : DelegatingHandler - { - private HttpResponseMessage _response; - - public RecordedDelegatingHandler() - { - StatusCodeToReturn = HttpStatusCode.Created; - SubsequentStatusCodeToReturn = StatusCodeToReturn; - } - - public RecordedDelegatingHandler(HttpResponseMessage response) - { - StatusCodeToReturn = HttpStatusCode.Created; - SubsequentStatusCodeToReturn = StatusCodeToReturn; - _response = response; - } - - public HttpStatusCode StatusCodeToReturn { get; set; } - - public HttpStatusCode SubsequentStatusCodeToReturn { get; set; } - - public string Request { get; private set; } - - public HttpRequestHeaders RequestHeaders { get; private set; } - - public HttpContentHeaders ContentHeaders { get; private set; } - - public HttpMethod Method { get; private set; } - - public Uri Uri { get; private set; } - - public bool IsPassThrough { get; set; } - - private int counter; - - protected override async Task SendAsync(HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) - { - counter++; - // Save request - if (request.Content == null) - { - Request = string.Empty; - } - else - { - Request = await request.Content.ReadAsStringAsync(); - } - RequestHeaders = request.Headers; - if (request.Content != null) - { - ContentHeaders = request.Content.Headers; - } - Method = request.Method; - Uri = request.RequestUri; - - // Prepare response - if (IsPassThrough) - { - return await base.SendAsync(request, cancellationToken); - } - else - { - if (_response != null && counter == 1) - { - return _response; - } - else - { - var statusCode = StatusCodeToReturn; - if (counter > 1) - statusCode = SubsequentStatusCodeToReturn; - HttpResponseMessage response = new HttpResponseMessage(statusCode); - response.Content = new StringContent(""); - return response; - } - } - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceGroupHelper.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceGroupHelper.cs deleted file mode 100644 index 83e3052257e1..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceGroupHelper.cs +++ /dev/null @@ -1,71 +0,0 @@ -// 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.Collections.Generic; -using System.Linq; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Rest; -using Microsoft.Rest.Azure; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; - -namespace WebSites.Tests.Helpers -{ - public static class ResourceGroupHelper - { - /// - /// Default constructor for management clients, using the TestSupport Infrastructure - /// - /// the test class - /// A resource management client, created from the current context (environment variables) - public static ResourceManagementClient GetResourceManagementClient(this TestBase testBase, MockContext context) - { - var client = context.GetServiceClient(); - return client; - } - - /// - /// Default constructor for management clients, using the TestSupport Infrastructure - /// - /// the test class - /// A resource management client, created from the current context (environment variables) - public static WebSiteManagementClient GetWebSiteManagementClient(this TestBase testBase, MockContext context) - { - var client = context.GetServiceClient(); - return client; - } - - /// - /// Get a default resource location for a given resource type - /// - /// The resource management client - /// The type of resource to create - /// A location where this resource type is supported for the current subscription - public static string GetResourceLocation(ResourceManagementClient client, string resourceType) - { - var supportedLocations = new HashSet(new[] { "East Asia", "West US", "North Central US", "North Europe", "West Europe", "South Central US", "East US" }, StringComparer.OrdinalIgnoreCase); - - string location = null; - string[] parts = resourceType.Split('/'); - string providerName = parts[0]; - var provider = client.Providers.Get(providerName); - foreach (var resource in provider.ResourceTypes) - { - if (string.Equals(resource.ResourceType, parts[1], StringComparison.OrdinalIgnoreCase)) - { - location = resource.Locations.FirstOrDefault(supportedLocations.Contains); - } - } - - return location; - } - - public static string GetServerFarmId(string subscription, string resourceGroup, string serverFarm) - { - var serverFarmIdFormat = "/subscriptions/{0}/resourcegroups/{1}/providers/Microsoft.Web/serverfarms/{2}"; - - return string.Format(serverFarmIdFormat, subscription, resourceGroup, serverFarm); - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceManagementClientUndoHandlers.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceManagementClientUndoHandlers.cs deleted file mode 100644 index 2102d516a329..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/ResourceManagementClientUndoHandlers.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -namespace Microsoft.WindowsAzure.Management.ResourceManagement.Testing -{ - using System; - using System.Collections.Generic; - using System.Net; - using System.Reflection; - using System.Threading; - - /// - /// Class used to discover and construct undo handlers available in the app domain - /// - /// - //[UndoHandlerFactory] - //public static partial class UndoContextDiscoveryExtensions - //{ - // /// - // /// Create an undo handler for ResourceManager operations - // /// - // /// An undo handler for ResourceManager operations - // public static OperationUndoHandler CreateResourceManagerUndoHandler() - // { - // return new ResourceManagementUndoHandler(); - // } - //} -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/WebSitesHelper.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/WebSitesHelper.cs deleted file mode 100644 index 7514d3561b60..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Helpers/WebSitesHelper.cs +++ /dev/null @@ -1,35 +0,0 @@ -// 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.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace WebSites.Tests.Helpers -{ - public static class WebSitesHelper - { - public static string BuildMetricFilter(DateTimeOffset startTime, DateTimeOffset endTime, string timeGrain, List metricNames) - { - var dateTimeFormat = "yyyy-MM-ddTHH:mm:ssZ"; - var filter = ""; - if (metricNames != null && metricNames.Count > 0) - { - if (metricNames.Count == 1) - { - filter = "name.value eq '" + metricNames[0] + "' and "; - } - else - { - filter = "(name.value eq '" + string.Join("' or name.value eq '", metricNames) + "') and "; - } - } - - filter += string.Format("startTime eq {0} and endTime eq {1} and timeGrain eq duration'{2}'", startTime.ToString(dateTimeFormat), endTime.ToString(dateTimeFormat), timeGrain); - - return filter; - } - } -} diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Microsoft.Azure.Management.WebSites.Tests.csproj b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Microsoft.Azure.Management.WebSites.Tests.csproj deleted file mode 100644 index 190d413e33de..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Microsoft.Azure.Management.WebSites.Tests.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - WebSites.Tests - Websites.Tests Class Library - WebSites.Tests - 1.0.0-preview - - - - true - true - - - - - - - - PreserveNewest - - - - - - - - \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Properties/AssemblyInfo.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Properties/AssemblyInfo.cs deleted file mode 100644 index b506ec03e96c..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -[assembly: AssemblyTitle("Web Sites CSM Client Tests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("WebSites.Tests")] -[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -[assembly: ComVisible(false)] - -[assembly: Guid("4c6e3586-2ebd-4b86-b46e-6850c1f5226e")] - -[assembly: AssemblyVersion("3.0.0.0")] -[assembly: AssemblyFileVersion("3.0.0.0")] diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/Recommendations.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/Recommendations.ScenarioTests.cs deleted file mode 100644 index 0703c6f22cd8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/Recommendations.ScenarioTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -// 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 System.Net; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class RecommendationScenarioTests : TestBase - { - [Fact] - public void ListRecommendationsRoundTrip() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string farmName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - string locationName = "West US"; - string siteName = TestUtilities.GenerateName("csmws"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = locationName - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, farmName, new AppServicePlan - { - Location = locationName, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, farmName); - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, siteName, new Site - { - Location = locationName, - ServerFarmId = serverfarmId - }); - - var recommendationResponse = webSitesClient.Recommendations.ListRecommendedRulesForWebApp(resourceGroupName, siteName); - - Assert.Equal("0", recommendationResponse.AsEnumerable().Count().ToString()); - Assert.Null(recommendationResponse.NextPageLink); - - var rec = recommendationResponse.FirstOrDefault(); - - if (rec != null) - { - Assert.Equal("PaidSiteSlots", rec.RuleName); - Assert.False(rec.IsDynamic); - Assert.True(rec.NextNotificationTime.HasValue); - Assert.True(rec.NotificationExpirationTime.HasValue); - Assert.True(rec.RecommendationId.HasValue); - Assert.Equal("WebSite", rec.ResourceScope); - Assert.Equal(1000, rec.Score); - } - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, farmName); - - var serverFarmResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - Assert.Equal("0", serverFarmResponse.AsEnumerable().Count().ToString()); - Assert.Null(serverFarmResponse.NextPageLink); - } - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/ResourceHealthMetadata.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/ResourceHealthMetadata.ScenarioTests.cs deleted file mode 100644 index 4f5fe421265f..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/ResourceHealthMetadata.ScenarioTests.cs +++ /dev/null @@ -1,139 +0,0 @@ -// 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 System.Net; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class ResourceHealthMetadataTests : TestBase - { - [Fact] - public void ListResourceHealthMetadata() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string farmName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - string locationName = "West US"; - string siteName = TestUtilities.GenerateName("csmws"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = locationName - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, farmName, new AppServicePlan - { - Location = locationName, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, farmName); - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, siteName, new Site - { - Location = locationName, - ServerFarmId = serverfarmId - }); - - var resourceHealthMetadataResponse = webSitesClient.ResourceHealthMetadata.ListBySite(resourceGroupName, siteName); - - Assert.NotEmpty(resourceHealthMetadataResponse); - if (resourceHealthMetadataResponse != null) { - Assert.Single(resourceHealthMetadataResponse); - } - - var metadata = resourceHealthMetadataResponse.FirstOrDefault(); - - if (metadata != null) - { - Assert.Equal("default", metadata.Name); - Assert.Equal("Microsoft.Web/sites/resourceHealthMetadata", metadata.Type); - } - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, farmName); - - var serverFarmResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - Assert.Empty(serverFarmResponse); - } - } - - [Fact] - public void GetResourceHealthMetadata() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string farmName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - string locationName = "West US"; - string siteName = TestUtilities.GenerateName("csmws"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = locationName - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, farmName, new AppServicePlan - { - Location = locationName, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, farmName); - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, siteName, new Site - { - Location = locationName, - ServerFarmId = serverfarmId - }); - - var resourceHealthMetadataResponse = webSitesClient.ResourceHealthMetadata.GetBySite(resourceGroupName, siteName); - - if (resourceHealthMetadataResponse != null) - { - Assert.Equal("default", resourceHealthMetadataResponse.Name); - Assert.Equal("Microsoft.Web/sites/resourceHealthMetadata", resourceHealthMetadataResponse.Type); - } - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, farmName); - - var serverFarmResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - Assert.Empty(serverFarmResponse); - } - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/SourceControls.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/SourceControls.ScenarioTests.cs deleted file mode 100644 index 7cb03c8b75d8..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/SourceControls.ScenarioTests.cs +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -using System.Linq; -using System.Net; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class SourceControlsScenarioTests : TestBase - {/* - private static readonly SourceControl GitHubSourceControl = new SourceControl() - { - SourceControlName = "GitHub", - Token = "myToken", - TokenSecret = "myTokenSecret" - }; - - private static readonly SourceControl BitbucketSourceControl = new SourceControl() - { - SourceControlName = "Bitbucket" - }; - - [Fact(Skip = "Obsolete API")] - public void TestUpdateSourceControlUpdates() - { - - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - - webSitesClient.Provider.UpdateSourceControl(GitHubSourceControl.SourceControlName, GitHubSourceControl); - - var sourceControlGetResponse = webSitesClient.Provider.GetSourceControl("GitHub"); - - AssertSourceControl(GitHubSourceControl, sourceControlGetResponse); - - var sourceControlListResponse = webSitesClient.Provider.GetSourceControls(); - - Assert.True(sourceControlListResponse.Value.Count >= 4, "Invalid source controls count at " + sourceControlListResponse.Value.Count); - var github = sourceControlListResponse.Value.FirstOrDefault(s => s.Name == "GitHub"); - AssertSourceControl(GitHubSourceControl, github); - - var bitbucket = sourceControlListResponse.Value.FirstOrDefault(s => s.Name == "Bitbucket"); - AssertSourceControl(BitbucketSourceControl, bitbucket); - } - - } - - private static void AssertSourceControl(SourceControl expectedSourceControl, SourceControl actualSourceControl) - { - Assert.Equal(expectedSourceControl.SourceControlName, actualSourceControl.SourceControlName); - Assert.Equal(expectedSourceControl.Token, actualSourceControl.Token); - Assert.Equal(expectedSourceControl.TokenSecret, actualSourceControl.TokenSecret); - } - */ - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebHostingPlan.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebHostingPlan.ScenarioTests.cs deleted file mode 100644 index fa9381440352..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebHostingPlan.ScenarioTests.cs +++ /dev/null @@ -1,201 +0,0 @@ -// 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.Collections.Generic; -using System.Linq; -using System.Net; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using Microsoft.Azure.Test.HttpRecorder; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class WebHostingPlanScenarioTests : TestBase - { - [Fact] - public void CreateAndVerifyWebHostingPlan() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string webHostingPlanName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, webHostingPlanName, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription() - { - Name = "B1", - Tier = "Basic", - Capacity = 1 - } - }); - - var webHostingPlanResponse = webSitesClient.AppServicePlans.Get(resourceGroupName, webHostingPlanName); - - Assert.Equal(webHostingPlanName, webHostingPlanResponse.Name); - Assert.Equal(1, webHostingPlanResponse.Sku.Capacity); - Assert.Equal("B1", webHostingPlanResponse.Sku.Name); - Assert.Equal("Basic", webHostingPlanResponse.Sku.Tier); - } - } - - [Fact] - public void CreateAndVerifyListOfWebHostingPlan() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string whpName1 = TestUtilities.GenerateName("csmwhp"); - string whpName2 = TestUtilities.GenerateName("csmwhp"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName1, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "D1", - Tier = "Shared" - } - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName2, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "B1", - Capacity = 1, - Tier = "Basic" - } - }); - - var webHostingPlanResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - var whp1 = webHostingPlanResponse.First(f => f.Name == whpName1); - var whp2 = webHostingPlanResponse.First(f => f.Name == whpName2); - Assert.Equal(whp1.Sku.Tier, "Shared"); - Assert.Equal(whp2.Sku.Tier, "Basic"); - } - } - - [Fact] - public void CreateAndDeleteWebHostingPlan() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string whpName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.WebApps.ListByResourceGroup(resourceGroupName); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "D1", - Capacity = 1, - Tier = "Shared" - } - }); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, whpName); - - var webHostingPlanResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - Assert.Equal(0, webHostingPlanResponse.Count()); - } - } - - [Fact] - public void GetAndSetAdminSiteWebHostingPlan() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string webSiteName = TestUtilities.GenerateName("csmws"); - string webHostingPlanName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - var serverFarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, - webHostingPlanName); - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - var serverFarm = webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, webHostingPlanName, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "S1", - Capacity = 1, - Tier = "Standard" - } - }); - - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, webSiteName, new Site() - { - Location = location, - Tags = new Dictionary { { "tag1", "value1" }, { "tag2", "" } }, - ServerFarmId = serverFarmId - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, webHostingPlanName, serverFarm); - - var webHostingPlanResponse = webSitesClient.AppServicePlans.Get(resourceGroupName, webHostingPlanName); - - Assert.Equal(webHostingPlanName, webHostingPlanResponse.Name); - Assert.Equal(1, webHostingPlanResponse.Sku.Capacity); - Assert.Equal("S1", webHostingPlanResponse.Sku.Name); - Assert.Equal("Standard", webHostingPlanResponse.Sku.Tier); - } - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.Backup.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.Backup.ScenarioTests.cs deleted file mode 100644 index 249d79aadbb7..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.Backup.ScenarioTests.cs +++ /dev/null @@ -1,101 +0,0 @@ -// 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 System.Net; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class BackupRestoreScenarioTests : TestBase - { - [Fact] - public void ListBackupsAndScheduledBackupRoundTrip() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string farmName = TestUtilities.GenerateName("csmsf"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - - string locationName = "West US"; - string siteName = TestUtilities.GenerateName("csmws"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = locationName - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, farmName, new AppServicePlan - { - Location = locationName, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, farmName); - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, siteName, new Site - { - Location = locationName, - ServerFarmId = serverfarmId - }); - - var backupResponse = webSitesClient.WebApps.ListBackups(resourceGroupName, siteName); - Assert.Equal(0, backupResponse.Count()); // , "Backup list should be empty" - - // the following URL just have a proper format, but it is not valid - for an API test it is not needed to be valid, - // since we are just testing a roundtrip here - // [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine")] - string storageUrl = "https://nonexistingusername3567.blob.core.windows.net/backup/?sv=2012-02-12&st=2013-12-05T19%3A30%3A45Z&se=2017-12-04T19%3A30%3A45Z&sr=c&sp=rwdl&sig=3BY5sbzQ2NeKvdaelzxc8inxJgE1mGq2a%2BaqUeFGJYo%3D"; - - var sr = new BackupRequest() - { - Enabled = false, - BackupSchedule = new BackupSchedule() - { - FrequencyInterval = 17, - FrequencyUnit = FrequencyUnit.Day, - KeepAtLeastOneBackup = true, - RetentionPeriodInDays = 26, - StartTime = DateTime.Now.AddDays(5) - }, - BackupName = "abc", - StorageAccountUrl = storageUrl - }; - - webSitesClient.WebApps.UpdateBackupConfiguration(resourceGroupName, siteName, sr); - - var backupConfiguration = webSitesClient.WebApps.GetBackupConfiguration(resourceGroupName, siteName); - - Assert.Equal(sr.Enabled, backupConfiguration.Enabled); - Assert.Equal(sr.BackupSchedule.FrequencyInterval, backupConfiguration.BackupSchedule.FrequencyInterval); - Assert.Equal(sr.BackupSchedule.FrequencyUnit, backupConfiguration.BackupSchedule.FrequencyUnit); - Assert.Equal(sr.BackupSchedule.KeepAtLeastOneBackup, backupConfiguration.BackupSchedule.KeepAtLeastOneBackup); - Assert.Equal(sr.BackupName, backupConfiguration.BackupName); - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, farmName); - - var serverFarmResponse = webSitesClient.AppServicePlans.ListByResourceGroup(resourceGroupName); - - Assert.Equal(0, serverFarmResponse.Count()); - } - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.ScenarioTests.cs deleted file mode 100644 index f023fa9700ba..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSite.ScenarioTests.cs +++ /dev/null @@ -1,489 +0,0 @@ -// 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.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Runtime.InteropServices; -using System.Threading; -using System.Xml; -using System.Xml.Linq; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using Microsoft.Azure.Test.HttpRecorder; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class WebSiteScenarioTests : TestBase - { - private delegate void WebsiteTestDelegate(string webSiteName, string resourceGroupName, string webHostingPlanName, string location, WebSiteManagementClient webSitesClient, ResourceManagementClient resourcesClient); - - [Fact] - public void CreateAndVerifyGetOnAWebsite() - { - RunWebsiteTestScenario( - (webSiteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - var webSite = webSitesClient.WebApps.Get(resourceGroupName, webSiteName); - - Assert.Equal(webSiteName, webSite.Name); - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, - resourceGroupName, whpName); - Assert.Equal(serverfarmId, webSite.ServerFarmId, StringComparer.OrdinalIgnoreCase); - Assert.Equal("value1", webSite.Tags["tag1"]); - Assert.Equal("", webSite.Tags["tag2"]); - Assert.NotNull(webSite.HostNameSslStates); - Assert.NotEmpty(webSite.HostNameSslStates); - }); - } - - [Fact] - public void CreateAndVerifyListOfWebsites() - { - RunWebsiteTestScenario( - (webSiteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - var webSites = webSitesClient.WebApps.ListByResourceGroup(resourceGroupName, null); - - Assert.Equal(1, webSites.Count()); - Assert.Equal(webSiteName, webSites.ToList()[0].Name); - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, - resourceGroupName, whpName); - Assert.Equal(serverfarmId, webSites.ToList()[0].ServerFarmId, StringComparer.OrdinalIgnoreCase); - }); - } - - [Fact] - public void CreateAndDeleteWebsite() - { - RunWebsiteTestScenario( - (webSiteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - #region Start/Stop website - - webSitesClient.WebApps.Stop(resourceGroupName, webSiteName); - - var getWebSiteResponse = webSitesClient.WebApps.Get(resourceGroupName, webSiteName); - Assert.NotNull(getWebSiteResponse); - Assert.Equal(getWebSiteResponse.State, "Stopped"); - - webSitesClient.WebApps.Start(resourceGroupName, webSiteName); - getWebSiteResponse = webSitesClient.WebApps.Get(resourceGroupName, webSiteName); - Assert.NotNull(getWebSiteResponse); - Assert.Equal(getWebSiteResponse.State, "Running"); - - #endregion Start/Stop website - - webSitesClient.WebApps.Delete(resourceGroupName, webSiteName, null); - - var webSites = webSitesClient.WebApps.ListByResourceGroup(resourceGroupName); - - Assert.Equal(0, webSites.Count()); - }); - } - - [Fact] - public void GetAndSetNonSensitiveSiteConfigs() - { - RunWebsiteTestScenario( - (siteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - #region Get/Set PythonVersion - - var configurationResponse = webSitesClient.WebApps.GetConfiguration(resourceGroupName, - siteName); - - Assert.NotNull(configurationResponse); - Assert.True(string.IsNullOrEmpty(configurationResponse.PythonVersion)); - - var configurationParameters = new SiteConfigResource - { - PythonVersion = "3.4" - }; - - var operationResponse = webSitesClient.WebApps.UpdateConfiguration(resourceGroupName, - siteName, configurationParameters); - - configurationResponse = webSitesClient.WebApps.GetConfiguration(resourceGroupName, siteName); - - Assert.NotNull(configurationResponse); - Assert.Equal(configurationResponse.PythonVersion, configurationParameters.PythonVersion); - - #endregion Get/Set PythonVersion - }); - } - - [Fact] - public void GetAndSetSensitiveSiteConfigs() - { - RunWebsiteTestScenario( - (siteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - #region Get/Set Application settings - - const string settingName = "Application Setting1", settingValue = "Setting Value 1"; - var appSetting = new StringDictionary { Properties = new Dictionary { { settingName, settingValue} } }; - var appSettingsResponse = webSitesClient.WebApps.UpdateApplicationSettings( - resourceGroupName, - siteName, - appSetting); - - Assert.NotNull(appSettingsResponse); - Assert.True(appSettingsResponse.Properties.Contains(new KeyValuePair(settingName, settingValue))); - - appSettingsResponse = webSitesClient.WebApps.ListApplicationSettings(resourceGroupName, siteName); - - Assert.NotNull(appSettingsResponse); - Assert.True(appSettingsResponse.Properties.Contains(new KeyValuePair(settingName, settingValue))); - - #endregion Get/Set Application settings - - #region Get/Set Metadata - - const string metadataName = "Metadata 1", metadataValue = "Metadata Value 1"; - var metadata = new StringDictionary { Properties = new Dictionary { { metadataName, metadataValue } } }; - var metadataResponse = webSitesClient.WebApps.UpdateMetadata( - resourceGroupName, - siteName, - metadata); - - Assert.NotNull(metadataResponse); - Assert.True(metadataResponse.Properties.Contains(new KeyValuePair(metadataName, metadataValue))); - - metadataResponse = webSitesClient.WebApps.ListMetadata(resourceGroupName, siteName); - - Assert.NotNull(metadataResponse); - Assert.True(metadataResponse.Properties.Contains(new KeyValuePair(metadataName, metadataValue))); - - #endregion Get/Set Metadata - - #region Get/Set Connection strings - - const string connectionStringName = "ConnectionString 1", - connectionStringValue = "ConnectionString Value 1"; - var connStringValueTypePair = new ConnStringValueTypePair - { - Value = connectionStringValue, - Type = ConnectionStringType.MySql - }; - - var connectionStringResponse = webSitesClient.WebApps.UpdateConnectionStrings( - resourceGroupName, - siteName, - new ConnectionStringDictionary { Properties = new Dictionary { { connectionStringName, connStringValueTypePair } } }); - - Assert.NotNull(connectionStringResponse); - Assert.True(connectionStringResponse.Properties.Contains(new KeyValuePair(connectionStringName, connStringValueTypePair), new ConnectionStringComparer())); - - connectionStringResponse = webSitesClient.WebApps.ListConnectionStrings(resourceGroupName, siteName); - - Assert.NotNull(connectionStringResponse); - Assert.True(connectionStringResponse.Properties.Contains(new KeyValuePair(connectionStringName, connStringValueTypePair), new ConnectionStringComparer())); - - #endregion Get/Set Connection strings - - #region Get Publishing credentials - - var credentialsResponse = webSitesClient.WebApps.ListPublishingCredentials(resourceGroupName, siteName); - - Assert.NotNull(credentialsResponse); - Assert.Equal("$" + siteName, credentialsResponse.PublishingUserName); - Assert.NotNull(credentialsResponse.PublishingPassword); - - #endregion Get Publishing credentials - - #region Get Publishing profile XML - - var publishingProfileResponse = webSitesClient.WebApps.ListPublishingProfileXmlWithSecrets(resourceGroupName, siteName, new CsmPublishingProfileOptions() { Format = "WebDeploy" }); - - Assert.NotNull(publishingProfileResponse); - var doc = XDocument.Load(publishingProfileResponse, LoadOptions.None); - Assert.NotNull(doc); - - #endregion Get Publishing profile XML - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - - webSitesClient.AppServicePlans.Delete(resourceGroupName, whpName); - }); - } - - [Fact] - public void GetAndSetSlotSettingsConfigs() - { - RunWebsiteTestScenario( - (siteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - #region Get/Set slot settings - - const string setting1Name = "AppSetting1", setting2Name = "AppSetting2"; - const string connection1Name = "ConnString1", connection2Name = "ConnString2"; - webSitesClient.WebApps.UpdateSlotConfigurationNames( - resourceGroupName, - siteName, - new SlotConfigNamesResource() - { - AppSettingNames = new List { setting1Name, setting2Name }, - ConnectionStringNames = new List { connection1Name, connection2Name }, - }); - - var response = webSitesClient.WebApps.ListSlotConfigurationNames(resourceGroupName, siteName); - - Assert.NotNull(response); - Assert.NotNull(response.AppSettingNames); - var appSettingsNames = response.AppSettingNames; - Assert.Single(appSettingsNames.Where(a => a == setting1Name)); - Assert.Single(appSettingsNames.Where(a => a == setting2Name)); - - Assert.NotNull(response.ConnectionStringNames); - var connectionStringNames = response.ConnectionStringNames; - Assert.Single(connectionStringNames.Where(a => a == connection1Name)); - Assert.Single(connectionStringNames.Where(a => a == connection2Name)); - - #endregion Get/Set slot settings - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - webSitesClient.AppServicePlans.Delete(resourceGroupName, whpName); - }); - } - - [Fact(Skip = "Failing on GitHubProxy GetWebHookInfo")] - public void LinkAndUnlinkSourceControlToWebsiteShouldSucceed() - { - /* - RunWebsiteTestScenario( - (webSiteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - var gitHubSourceControl = new SourceControl() - { - SourceControlName = "GitHub", - Token = "36c7290f81fda5877d52d2fc3fbc7c31acd25051", - Location = locationName - }; - - webSitesClient.Provider.UpdateSourceControl(gitHubSourceControl.SourceControlName, gitHubSourceControl); - - var siteSourceControlUpdateResponse = - webSitesClient.WebApps.UpdateSiteSourceControl( - resourceGroupName, - webSiteName, - new SiteSourceControl() { RepoUrl = "https://github.com/amitaptest/HelloKudu"}); - - Assert.Equal("https://github.com/amitaptest/HelloKudu", siteSourceControlUpdateResponse.RepoUrl); - - var operationResponse = - webSitesClient.WebApps.DeleteSiteSourceControl( - resourceGroupName, - webSiteName); - }); - */ - } - - private void RunWebsiteTestScenario(WebsiteTestDelegate testAction, string skuTier = "Shared", string skuName = "D1", - [System.Runtime.CompilerServices.CallerMemberName] - string methodName= "testframework_failed") - { - using (var context = MockContext.Start(this.GetType(), methodName)) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - var webSiteName = TestUtilities.GenerateName("csmws"); - var resourceGroupName = TestUtilities.GenerateName("csmrg"); - var webHostingPlanName = TestUtilities.GenerateName("csmwhp"); - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - var serverFarm = webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, webHostingPlanName, - new AppServicePlan() - { - Location = location, - Sku = new SkuDescription() - { - Name = skuName, - Tier = skuTier - } - }); - - var webSite = webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, webSiteName, new Site - { - Location = location, - Tags = new Dictionary { { "tag1", "value1" }, { "tag2", "" } }, - ServerFarmId = serverFarm.Id - }); - - Assert.Equal(webSiteName, webSite.Name); - Assert.Equal(serverFarm.Id, webSite.ServerFarmId, StringComparer.OrdinalIgnoreCase); - Assert.Equal("value1", webSite.Tags["tag1"]); - Assert.Equal("", webSite.Tags["tag2"]); - - testAction(webSiteName, resourceGroupName, webHostingPlanName, location, webSitesClient, resourcesClient); - } - } - - [Fact] - public void GetAndSetSiteLimits() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - var whpName = TestUtilities.GenerateName("cswhp"); - var resourceGroupName = TestUtilities.GenerateName("csmrg"); - - var serverfarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, - resourceGroupName, whpName); - var locationName = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - var siteName = TestUtilities.GenerateName("csmws"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = locationName - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName, new AppServicePlan() - { - Location = locationName, - Sku = new SkuDescription - { - Name = "D1", - Tier = "Shared", - Capacity = 1 - } - }); - - var createResponse = webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, siteName, new Site - { - Location = locationName, - ServerFarmId = serverfarmId - }); - - #region Get/Set Site limits - - var expectedSitelimits = new SiteLimits() - { - MaxDiskSizeInMb = 512, - MaxMemoryInMb = 1024, - MaxPercentageCpu = 70.5 - }; - var siteConfig = new SiteConfigResource - { - Limits = expectedSitelimits - }; - - webSitesClient.WebApps.UpdateConfiguration( - resourceGroupName, - siteName, - siteConfig); - - var siteGetConfigResponse = webSitesClient.WebApps.GetConfiguration(resourceGroupName, siteName); - - Assert.NotNull(siteGetConfigResponse); - var limits = siteGetConfigResponse.Limits; - Assert.NotNull(limits); - Assert.Equal(expectedSitelimits.MaxDiskSizeInMb, limits.MaxDiskSizeInMb); - Assert.Equal(expectedSitelimits.MaxMemoryInMb, limits.MaxMemoryInMb); - Assert.Equal(expectedSitelimits.MaxPercentageCpu, limits.MaxPercentageCpu); - - #endregion Get/Set Site limits - - webSitesClient.WebApps.Delete(resourceGroupName, siteName, deleteMetrics: true); - webSitesClient.AppServicePlans.Delete(resourceGroupName, whpName); - } - } - - [Fact(Skip = "Test failing due to test issue. Needs further investigation")] - //[Fact] - public void CloneSite() - { - RunWebsiteTestScenario( - (webSiteName, resourceGroupName, whpName, locationName, webSitesClient, resourcesClient) => - { - string targetSiteName = TestUtilities.GenerateName("csmws"); - string location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - var webAppIdFormat = "/subscriptions/{0}/resourcegroups/{1}/providers/Microsoft.Web/sites/{2}"; - var serverFarmIdFormat = "/subscriptions/{0}/resourcegroups/{1}/providers/Microsoft.Web/serverfarms/{2}"; - var site = new Site() - { - Location = "West US", - ServerFarmId = string.Format(serverFarmIdFormat, webSitesClient.SubscriptionId, resourceGroupName, whpName), - CloningInfo = new CloningInfo() - { - SourceWebAppId = string.Format(webAppIdFormat, webSitesClient.SubscriptionId, resourceGroupName, webSiteName), - } - }; - - ServiceClientTracing.IsEnabled = true; - var operationResponse = webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, targetSiteName, site); - ServiceClientTracing.IsEnabled = false; - }, "Premium", "P1"); - } - - private Guid ParseOperationIdFromLocation(string location) - { - var locationSplit = location.Split('/'); - Assert.NotEmpty(locationSplit); - Guid operationId; - Assert.True(Guid.TryParse(locationSplit.Last(), out operationId)); - return operationId; - } - - private void WaitForOperationCompletion(double timeOutInSeconds, double timeIntervalInMilliSeconds, string operationName, Func operationToCall) - { - DateTime endTime = DateTime.Now.AddSeconds(timeOutInSeconds); - double interval = timeIntervalInMilliSeconds; - HttpStatusCode status = HttpStatusCode.Accepted; - while (status == HttpStatusCode.Accepted && DateTime.Now < endTime) - { - status = operationToCall(); - if (DateTime.Now.AddMilliseconds(interval) > endTime) - { - interval = (endTime - DateTime.Now).TotalMilliseconds; - } - - Thread.Sleep((int)interval); - } - - switch (status) - { - case HttpStatusCode.Accepted: - throw new Exception(string.Format("Timed out waiting on operation {0} after {1} s", operationName, timeIntervalInMilliSeconds)); - case HttpStatusCode.OK: - return; - default: - throw new Exception(string.Format("Operation {0} was not successful. Status {1}", operationName, status.ToString())); - } - } - } - - class ConnectionStringComparer : IEqualityComparer> - { - public bool Equals(KeyValuePair x, KeyValuePair y) - { - return string.Equals(x.Key, y.Key, StringComparison.OrdinalIgnoreCase) && - string.Equals(x.Value.Value, y.Value.Value, StringComparison.OrdinalIgnoreCase) && x.Value.Type == y.Value.Type; - } - - public int GetHashCode(KeyValuePair obj) - { - return obj.Key.GetHashCode() ^ obj.Value.Type.GetHashCode() ^ obj.Value.Value.GetHashCode(); - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSiteSlot.ScenarioTests.cs b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSiteSlot.ScenarioTests.cs deleted file mode 100644 index 2d6f7dd37e44..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/ScenarioTests/WebSiteSlot.ScenarioTests.cs +++ /dev/null @@ -1,187 +0,0 @@ -// 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 System.Collections.Generic; -using System.Net; -using Microsoft.Azure.Management.Resources; -using Microsoft.Azure.Management.Resources.Models; -using Microsoft.Azure.Management.WebSites; -using Microsoft.Azure.Management.WebSites.Models; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using WebSites.Tests.Helpers; -using Xunit; - -namespace WebSites.Tests.ScenarioTests -{ - public class WebSiteSlotScenarioTests : TestBase - { - [Fact] - public void CreateAndVerifyGetOnAWebsiteSlot() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string webSiteName = TestUtilities.GenerateName("csmws"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - string whpName = TestUtilities.GenerateName("cswhp"); - var serverFarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, whpName); - const string slotName = "staging"; - string siteWithSlotName = string.Format("{0}({1})", webSiteName, slotName); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard" - } - }); - - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, webSiteName, new Site - { - Location = location, - Tags = new Dictionary { { "tag1", "value1" }, { "tag2", "" } }, - ServerFarmId = serverFarmId - }); - - string siteSlotResourceName = webSiteName + "/" + slotName; - webSitesClient.WebApps.CreateOrUpdateSlot(resourceGroupName, webSiteName, new Site() - { - Location = location, - ServerFarmId = serverFarmId - }, slotName); - - // TODO: Replace with GetSite with slotName API once its CSM related issue is resolved. - var webSiteSlotCollection = webSitesClient.WebApps.ListSlots(resourceGroupName, webSiteName); - Assert.Equal(1, webSiteSlotCollection.Count()); - Assert.Equal(siteSlotResourceName, webSiteSlotCollection.ToList()[0].Name); - } - } - - [Fact] - public void CreateAndVerifyListOfSlots() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string webSiteName = TestUtilities.GenerateName("csmws"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - string whpName = TestUtilities.GenerateName("csmwhp"); - var serverFarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, whpName); - const string slotName = "staging"; - string siteWithSlotName = string.Format("{0}({1})", webSiteName, slotName); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName, new AppServicePlan() - { - Location = location, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, webSiteName, new Site - { - Location = location, - ServerFarmId = serverFarmId - }); - - string siteSlotResourceName = webSiteName + "/" + slotName; - webSitesClient.WebApps.CreateOrUpdateSlot(resourceGroupName, webSiteName, slot: slotName, siteEnvelope: - new Site - { - Location = location, - ServerFarmId = serverFarmId - }); - - var webSiteSlots = webSitesClient.WebApps.ListSlots(resourceGroupName, webSiteName); - - Assert.Equal(1, webSiteSlots.Count()); - Assert.Equal(siteSlotResourceName, webSiteSlots.ToList()[0].Name); - Assert.Equal(serverFarmId, webSiteSlots.ToList()[0].ServerFarmId, StringComparer.OrdinalIgnoreCase); - } - } - - [Fact] - public void CreateAndDeleteWebSiteSlot() - { - using (var context = MockContext.Start(this.GetType())) - { - var webSitesClient = this.GetWebSiteManagementClient(context); - var resourcesClient = this.GetResourceManagementClient(context); - - string webSiteName = TestUtilities.GenerateName("csmws"); - string resourceGroupName = TestUtilities.GenerateName("csmrg"); - string whpName = TestUtilities.GenerateName("csmwhp"); - var serverFarmId = ResourceGroupHelper.GetServerFarmId(webSitesClient.SubscriptionId, resourceGroupName, whpName); - const string slotName = "staging"; - string siteWithSlotName = string.Format("{0}({1})", webSiteName, slotName); - - var location = ResourceGroupHelper.GetResourceLocation(resourcesClient, "Microsoft.Web/sites"); - - resourcesClient.ResourceGroups.CreateOrUpdate(resourceGroupName, - new ResourceGroup - { - Location = location - }); - - webSitesClient.AppServicePlans.CreateOrUpdate(resourceGroupName, whpName, - new AppServicePlan - { - Location = location, - Sku = new SkuDescription - { - Name = "S1", - Tier = "Standard", - Capacity = 1 - } - }); - - webSitesClient.WebApps.CreateOrUpdate(resourceGroupName, webSiteName, new Site - { - Location = location, - ServerFarmId = serverFarmId - }); - - webSitesClient.WebApps.CreateOrUpdateSlot(resourceGroupName, webSiteName, slot: slotName, siteEnvelope: - new Site - { - Location = location, - ServerFarmId = serverFarmId - }); - - webSitesClient.WebApps.DeleteSlot(resourceGroupName, webSiteName, slotName); - - var webSites = webSitesClient.WebApps.ListSlots(resourceGroupName, webSiteName); - - Assert.Equal(0, webSites.Count()); - } - } - } -} - diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/RecommendationScenarioTests/ListRecommendationsRoundTrip.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/RecommendationScenarioTests/ListRecommendationsRoundTrip.json deleted file mode 100644 index fd966a663598..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/RecommendationScenarioTests/ListRecommendationsRoundTrip.json +++ /dev/null @@ -1,497 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg8846?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnODg0Nj9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "95deffb3-a530-4e09-bca3-d9fe57c5443e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:09:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "220d9054-3125-4969-851e-6f7f5e80fbb2" - ], - "x-ms-correlation-request-id": [ - "220d9054-3125-4969-851e-6f7f5e80fbb2" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T090929Z:220d9054-3125-4969-851e-6f7f5e80fbb2" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "171" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846\",\r\n \"name\": \"csmrg8846\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/serverfarms/csmsf5277?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjUyNzc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "63720bb8-5ec0-4772-90cb-30eb78e59185" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "110" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:09:42 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "be55b22d-3106-461c-a054-680f78d9960c" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "7aa834e0-9432-40e0-9191-3090d74c05ad" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T090943Z:7aa834e0-9432-40e0-9191-3090d74c05ad" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1285" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/serverfarms/csmsf5277\",\r\n \"name\": \"csmsf5277\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22426,\r\n \"name\": \"csmsf5277\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg8846-WestUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"West US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg8846\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-bay-137_22426\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/sites/csmws6609?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czY2MDk/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg8846/providers/Microsoft.Web/serverfarms/csmsf5277\"\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1d482623-49c5-4f26-a81a-908fd7e8e648" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "200" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:10:04 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BC9A064140\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d1603a99-bf36-4569-895d-c728f0fbd93e" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "e48ba77a-0048-40fd-b839-ca2574eeef77" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091004Z:e48ba77a-0048-40fd-b839-ca2574eeef77" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3096" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/sites/csmws6609\",\r\n \"name\": \"csmws6609\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"name\": \"csmws6609\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws6609.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg8846-WestUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-bay-137.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg8846-WestUSwebspace/sites/csmws6609\",\r\n \"repositorySiteName\": \"csmws6609\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws6609.azurewebsites.net\",\r\n \"csmws6609.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws6609.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws6609.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/serverfarms/csmsf5277\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:09:45.86\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws6609\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"40.112.243.6\",\r\n \"possibleInboundIpAddresses\": \"40.112.243.6\",\r\n \"outboundIpAddresses\": \"40.112.243.6,13.93.220.248,13.93.221.96,13.93.221.41,13.93.220.182\",\r\n \"possibleOutboundIpAddresses\": \"40.112.243.6,13.93.220.248,13.93.221.96,13.93.221.41,13.93.220.182,13.93.221.147,13.93.220.112,13.91.111.88,13.93.220.5,13.93.220.231\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-bay-137\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg8846\",\r\n \"defaultHostName\": \"csmws6609.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/sites/csmws6609/recommendations?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czY2MDkvcmVjb21tZW5kYXRpb25zP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b0599eee-7bc9-4e4f-9043-4b8b33037349" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:10:04 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a4db5d00-c06a-4a6c-8959-8df14c0bc978" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "f4415756-002f-43ca-9c17-82ffde2ec889" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091005Z:f4415756-002f-43ca-9c17-82ffde2ec889" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "38" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/sites/csmws6609?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czY2MDk/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ac14807f-fd9f-4518-b698-81c721b7c691" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:10:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BC9A064140\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b347956a-a2d7-478b-9d09-92fed55d7c26" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "fa45e6f3-33cd-4b31-95dd-88c6d968c23b" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091009Z:fa45e6f3-33cd-4b31-95dd-88c6d968c23b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/serverfarms/csmsf5277?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjUyNzc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6a98dde1-3694-450a-9421-713d119b486f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:10:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2936761e-7fb9-4095-804a-21d447b68548" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "23da578d-c315-430b-925a-e0b7394aa1b4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091012Z:23da578d-c315-430b-925a-e0b7394aa1b4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8846/providers/Microsoft.Web/serverfarms?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODg0Ni9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "dfd05bf2-0045-4099-b104-0d991b4f57f5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:10:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "c2c99084-893f-4427-be29-2664ecbdf5cf" - ], - "x-ms-correlation-request-id": [ - "c2c99084-893f-4427-be29-2664ecbdf5cf" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091012Z:c2c99084-893f-4427-be29-2664ecbdf5cf" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "ListRecommendationsRoundTrip": [ - "csmsf5277", - "csmrg8846", - "csmws6609" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/GetResourceHealthMetadata.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/GetResourceHealthMetadata.json deleted file mode 100644 index 5ca734c0e546..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/GetResourceHealthMetadata.json +++ /dev/null @@ -1,500 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2790?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMjc5MD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "47cd834e-321b-4f85-9061-0074d4af9ba5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:48 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "c7b0d7a0-6317-4f40-a4f1-6bac96b7b7fc" - ], - "x-ms-correlation-request-id": [ - "c7b0d7a0-6317-4f40-a4f1-6bac96b7b7fc" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091848Z:c7b0d7a0-6317-4f40-a4f1-6bac96b7b7fc" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "171" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790\",\r\n \"name\": \"csmrg2790\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/serverfarms/csmsf1177?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjExNzc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "aa01a3fe-6744-4c9d-ad14-c402a059bd96" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "110" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:55 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "4ab0361e-afb3-42f5-8cc0-a9002541df14" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "de9fa74c-f010-43cf-9887-f79b37a8a26a" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091855Z:de9fa74c-f010-43cf-9887-f79b37a8a26a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1285" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/serverfarms/csmsf1177\",\r\n \"name\": \"csmsf1177\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"serverFarmId\": 25020,\r\n \"name\": \"csmsf1177\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg2790-WestUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"West US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg2790\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-bay-067_25020\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/sites/csmws4978?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQ5Nzg/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2790/providers/Microsoft.Web/serverfarms/csmsf1177\"\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4cd974be-db76-4e87-944d-a5cd2ada34ed" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "200" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDE47C0880\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f81167d1-fcf6-4f50-b4e1-a34491793e7b" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "497" - ], - "x-ms-correlation-request-id": [ - "fdb718c2-bb72-4ecd-84b5-2a552e8a3874" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091918Z:fdb718c2-bb72-4ecd-84b5-2a552e8a3874" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3083" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/sites/csmws4978\",\r\n \"name\": \"csmws4978\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"name\": \"csmws4978\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws4978.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg2790-WestUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-bay-067.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg2790-WestUSwebspace/sites/csmws4978\",\r\n \"repositorySiteName\": \"csmws4978\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws4978.azurewebsites.net\",\r\n \"csmws4978.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws4978.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws4978.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/serverfarms/csmsf1177\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:19:00.2866667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws4978\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"104.210.38.149\",\r\n \"possibleInboundIpAddresses\": \"104.210.38.149,40.112.243.19\",\r\n \"outboundIpAddresses\": \"23.99.58.14,23.99.60.163,23.99.57.5,23.99.60.173\",\r\n \"possibleOutboundIpAddresses\": \"23.99.58.14,23.99.60.163,23.99.57.5,23.99.60.173,104.42.50.23,104.42.51.28,104.42.51.105,104.42.51.184,40.83.173.19\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-bay-067\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg2790\",\r\n \"defaultHostName\": \"csmws4978.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/sites/csmws4978/resourceHealthMetadata/default?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQ5NzgvcmVzb3VyY2VIZWFsdGhNZXRhZGF0YS9kZWZhdWx0P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4d5118d4-f237-4a6f-ac8a-56e69f89f15c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDE47C0880\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "10a075f4-4239-467e-8ed0-013d772b820d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "e54b6239-843c-4ef6-8356-9017b291feb4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091918Z:e54b6239-843c-4ef6-8356-9017b291feb4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "289" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/sites/csmws4978/resourceHealthMetadata/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Web/sites/resourceHealthMetadata\",\r\n \"properties\": {\r\n \"category\": \"Dedicated\",\r\n \"signalAvailability\": true\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/sites/csmws4978?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQ5Nzg/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9b994de9-5ff8-4137-b623-9c1e6f51057b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:22 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDE47C0880\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7811a49e-67a8-470b-9d7d-c45776d827e5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14996" - ], - "x-ms-correlation-request-id": [ - "70598a4d-266b-41af-8e61-1f5d70510c83" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091923Z:70598a4d-266b-41af-8e61-1f5d70510c83" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/serverfarms/csmsf1177?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjExNzc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2be3f554-4984-422a-84c5-54523192e284" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:25 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "de9688af-b1a5-40d5-868d-b483bf3a5e2a" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14995" - ], - "x-ms-correlation-request-id": [ - "495cd3a5-20d4-483e-b0cc-1ea9b6fdae52" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091925Z:495cd3a5-20d4-483e-b0cc-1ea9b6fdae52" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2790/providers/Microsoft.Web/serverfarms?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjc5MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2d50f816-6486-4308-a571-55cfedb94e8e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:25 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "ab1b0f2e-caf5-4249-851b-07e871f213d4" - ], - "x-ms-correlation-request-id": [ - "ab1b0f2e-caf5-4249-851b-07e871f213d4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091925Z:ab1b0f2e-caf5-4249-851b-07e871f213d4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "GetResourceHealthMetadata": [ - "csmsf1177", - "csmrg2790", - "csmws4978" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/ListResourceHealthMetadata.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/ListResourceHealthMetadata.json deleted file mode 100644 index 2cfaaac24b63..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/ResourceHealthMetadataTests/ListResourceHealthMetadata.json +++ /dev/null @@ -1,500 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg5823?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnNTgyMz9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "85af716f-3e34-42cd-817b-0243d88f57e1" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:17:46 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "c6e5f602-2d53-4f5a-8675-8a03daf30212" - ], - "x-ms-correlation-request-id": [ - "c6e5f602-2d53-4f5a-8675-8a03daf30212" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091747Z:c6e5f602-2d53-4f5a-8675-8a03daf30212" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "171" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823\",\r\n \"name\": \"csmrg5823\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/serverfarms/csmsf1484?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjE0ODQ/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eec028fd-33b0-4397-9dcf-1d34196b4c2d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "110" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f183b62e-c44f-42e8-af72-9e7cc46aba0f" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "f15cbe74-0467-4ff9-b5ce-10e2c648ca65" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091803Z:f15cbe74-0467-4ff9-b5ce-10e2c648ca65" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1285" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/serverfarms/csmsf1484\",\r\n \"name\": \"csmsf1484\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"serverFarmId\": 17331,\r\n \"name\": \"csmsf1484\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg5823-WestUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"West US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg5823\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-bay-141_17331\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/sites/csmws1437?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czE0Mzc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg5823/providers/Microsoft.Web/serverfarms/csmsf1484\"\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "41ccff01-716c-4b45-833a-16a503aa5f4e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "200" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:26 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDC578606B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "29f6b98a-55bb-4d68-982a-57b9362ddadc" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "498" - ], - "x-ms-correlation-request-id": [ - "dd018e8b-e1df-4062-9798-66bb342ccf02" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091826Z:dd018e8b-e1df-4062-9798-66bb342ccf02" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3104" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/sites/csmws1437\",\r\n \"name\": \"csmws1437\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"name\": \"csmws1437\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws1437.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg5823-WestUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-bay-141.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg5823-WestUSwebspace/sites/csmws1437\",\r\n \"repositorySiteName\": \"csmws1437\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws1437.azurewebsites.net\",\r\n \"csmws1437.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws1437.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws1437.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/serverfarms/csmsf1484\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:18:08.2566667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws1437\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"40.112.243.8\",\r\n \"possibleInboundIpAddresses\": \"40.112.243.8\",\r\n \"outboundIpAddresses\": \"40.112.243.8,52.160.87.144,52.160.81.29,40.83.173.84,52.160.87.145\",\r\n \"possibleOutboundIpAddresses\": \"40.112.243.8,52.160.87.144,52.160.81.29,40.83.173.84,52.160.87.145,52.160.69.205,40.118.207.199,52.160.67.221,52.160.67.220,52.160.67.45\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-bay-141\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg5823\",\r\n \"defaultHostName\": \"csmws1437.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/sites/csmws1437/resourceHealthMetadata?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czE0MzcvcmVzb3VyY2VIZWFsdGhNZXRhZGF0YT9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "920f16d2-86d8-4bce-bcb6-b7f45f1fb490" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:27 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDC578606B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "19f8f1e1-622e-4f92-90ad-691db24c75f8" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "bb40333f-41d1-47b2-b853-b6a2364098bf" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091827Z:bb40333f-41d1-47b2-b853-b6a2364098bf" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "327" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/sites/csmws1437/resourceHealthMetadata/default\",\r\n \"name\": \"default\",\r\n \"type\": \"Microsoft.Web/sites/resourceHealthMetadata\",\r\n \"properties\": {\r\n \"category\": \"Dedicated\",\r\n \"signalAvailability\": true\r\n }\r\n }\r\n ],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/sites/csmws1437?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czE0Mzc/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d10ade8f-3700-47c5-b076-299972bf2247" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:32 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDC578606B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9bc436fc-4fbf-4eaf-bb88-5c115b34c30a" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "b63d7628-7907-4769-87f6-969ca5109e54" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091833Z:b63d7628-7907-4769-87f6-969ca5109e54" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/serverfarms/csmsf1484?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjE0ODQ/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7683d37c-0062-4e8d-a1ee-c61328455299" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:35 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1597e975-fa33-4019-8a8c-bc719c5c1684" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" - ], - "x-ms-correlation-request-id": [ - "db20d213-c514-492f-9a8d-668078d5539e" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091835Z:db20d213-c514-492f-9a8d-668078d5539e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg5823/providers/Microsoft.Web/serverfarms?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNTgyMy9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "03d84474-2f4f-4162-b5e7-f392c30e52aa" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:18:35 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "5c5f9561-ca21-4c37-adaa-81c80aa770c3" - ], - "x-ms-correlation-request-id": [ - "5c5f9561-ca21-4c37-adaa-81c80aa770c3" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091836Z:5c5f9561-ca21-4c37-adaa-81c80aa770c3" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "ListResourceHealthMetadata": [ - "csmsf1484", - "csmrg5823", - "csmws1437" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/SourceControlsScenarioTests/TestUpdateSourceControlUpdates.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/SourceControlsScenarioTests/TestUpdateSourceControlUpdates.json deleted file mode 100644 index 587a09b7852b..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/SourceControlsScenarioTests/TestUpdateSourceControlUpdates.json +++ /dev/null @@ -1,218 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/providers/Microsoft.Web/sourcecontrols/GitHub?api-version=2015-08-01", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"global\",\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"myToken\",\r\n \"tokenSecret\": \"myTokenSecret\"\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "137" - ], - "x-ms-client-request-id": [ - "ada34779-d3c0-4823-8c25-764fee498a2d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"GitHub\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"myToken\",\r\n \"tokenSecret\": \"myTokenSecret\",\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:53:01 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "aa1a7f78-317a-4c94-bfd8-449d7c22833c" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "5d1b1807-eea4-40fd-a29d-bc5b78d8117c" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T015301Z:5d1b1807-eea4-40fd-a29d-bc5b78d8117c" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Web/sourcecontrols/GitHub?api-version=2015-08-01", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9aae1cef-ed71-4585-bfec-d609ea4c1c0a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"GitHub\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"myToken\",\r\n \"tokenSecret\": \"myTokenSecret\",\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:53:01 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3dc44903-535f-413b-aae0-dacefc09e210" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "14993" - ], - "x-ms-correlation-request-id": [ - "59dbfb96-80c9-48b0-b47a-45e553adc118" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T015301Z:59dbfb96-80c9-48b0-b47a-45e553adc118" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Web/sourcecontrols?api-version=2015-08-01", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8dc562f8-97f9-49db-b77b-6790b242dffb" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": null,\r\n \"name\": \"GitHub\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"myToken\",\r\n \"tokenSecret\": \"myTokenSecret\",\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Bitbucket\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"Bitbucket\",\r\n \"token\": null,\r\n \"tokenSecret\": null,\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"Dropbox\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"Dropbox\",\r\n \"token\": null,\r\n \"tokenSecret\": null,\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n },\r\n {\r\n \"id\": null,\r\n \"name\": \"OneDrive\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"OneDrive\",\r\n \"token\": null,\r\n \"tokenSecret\": null,\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:53:01 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "336a6b2e-7a9c-486c-b81a-f1bea9beddaa" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-tenant-reads": [ - "14992" - ], - "x-ms-correlation-request-id": [ - "08bceb70-24b2-4ce4-92bb-d8d801cc980e" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T015301Z:08bceb70-24b2-4ce4-92bb-d8d801cc980e" - ] - }, - "StatusCode": 200 - } - ], - "Names": {}, - "Variables": { - "SubscriptionId": "3312c132-fc40-493f-9c97-82d80256a313" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndDeleteWebHostingPlan.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndDeleteWebHostingPlan.json deleted file mode 100644 index 8ad39a2a926d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndDeleteWebHostingPlan.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eda2933e-efa2-4e96-8c2e-e6605e520575" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:21 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "0aacf188-56e9-4a93-beab-0208fadcb2b9" - ], - "x-ms-correlation-request-id": [ - "0aacf188-56e9-4a93-beab-0208fadcb2b9" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091222Z:0aacf188-56e9-4a93-beab-0208fadcb2b9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg1760?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMTc2MD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7c0f2c6-958a-4273-ae4a-e4adeda8327d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:26 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "72b4a669-c29d-4d48-883b-a0db2f7823d6" - ], - "x-ms-correlation-request-id": [ - "72b4a669-c29d-4d48-883b-a0db2f7823d6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091226Z:72b4a669-c29d-4d48-883b-a0db2f7823d6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760\",\r\n \"name\": \"csmrg1760\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760/providers/Microsoft.Web/sites?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTc2MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f2d2b555-eba1-4d97-9a1f-dc43ec9370f3" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:26 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "e33a2bff-6b03-4e43-8682-a3243f1160da" - ], - "x-ms-correlation-request-id": [ - "e33a2bff-6b03-4e43-8682-a3243f1160da" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091227Z:e33a2bff-6b03-4e43-8682-a3243f1160da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760/providers/Microsoft.Web/serverfarms/csmsf767?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTc2MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjc2Nz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f424d453-f3ac-4442-9cb6-8af22e4128e4" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "117" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:40 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "88fb0579-485d-4f21-86fe-e0b5a8de14ca" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "d5e3ea15-1330-43dd-ba59-b76c072273cb" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091240Z:d5e3ea15-1330-43dd-ba59-b76c072273cb" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1305" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760/providers/Microsoft.Web/serverfarms/csmsf767\",\r\n \"name\": \"csmsf767\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22669,\r\n \"name\": \"csmsf767\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1760-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1760\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-105_22669\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760/providers/Microsoft.Web/serverfarms/csmsf767?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTc2MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjc2Nz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d5359987-c397-4e38-bafa-c8090cfd0797" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:43 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6bc4357c-ff8c-4a5b-8127-0025b5bc99fe" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "14b2a1e7-f34d-4714-8f49-fe3298a6bb84" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091244Z:14b2a1e7-f34d-4714-8f49-fe3298a6bb84" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1760/providers/Microsoft.Web/serverfarms?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTc2MC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "78d2dda0-6ff4-4526-9f55-f58687ed12cb" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:44 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "67665b54-59a0-40c1-a205-08501d946a32" - ], - "x-ms-correlation-request-id": [ - "67665b54-59a0-40c1-a205-08501d946a32" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091244Z:67665b54-59a0-40c1-a205-08501d946a32" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndDeleteWebHostingPlan": [ - "csmsf767", - "csmrg1760" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyListOfWebHostingPlan.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyListOfWebHostingPlan.json deleted file mode 100644 index 243bbe841890..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyListOfWebHostingPlan.json +++ /dev/null @@ -1,359 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7d434db0-87a3-4f39-aa41-290abf44d81b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "b84c92f5-b4a7-4e7f-ab36-ef8524940a06" - ], - "x-ms-correlation-request-id": [ - "b84c92f5-b4a7-4e7f-ab36-ef8524940a06" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091329Z:b84c92f5-b4a7-4e7f-ab36-ef8524940a06" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg1269?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMTI2OT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1b3832b7-103b-48cc-9233-411d41580856" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "fc49ad05-fa4c-4838-a6e6-7d97de3bd94f" - ], - "x-ms-correlation-request-id": [ - "fc49ad05-fa4c-4838-a6e6-7d97de3bd94f" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091333Z:fc49ad05-fa4c-4838-a6e6-7d97de3bd94f" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269\",\r\n \"name\": \"csmrg1269\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp7300?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTI2OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHA3MzAwP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c9a9da4d-e621-4241-9afe-ed07a696e746" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:46 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "47bca2d2-cc1b-4ac6-81a2-1cb8bd0d90f8" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "8f266d59-769f-4d5d-97d6-3d64aad1aee8" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091346Z:8f266d59-769f-4d5d-97d6-3d64aad1aee8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp7300\",\r\n \"name\": \"csmwhp7300\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22193,\r\n \"name\": \"csmwhp7300\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1269-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1269\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-109_22193\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp8496?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTI2OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHA4NDk2P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f614b95f-00b6-4383-be9c-ecdaf2f78d67" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "116" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:52 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e1c1ed46-ed40-46f7-9085-06a23a5e9d85" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "99f2f258-cd97-4543-9e2f-607161a15ec6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091352Z:99f2f258-cd97-4543-9e2f-607161a15ec6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1310" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp8496\",\r\n \"name\": \"csmwhp8496\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22194,\r\n \"name\": \"csmwhp8496\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1269-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 3,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1269\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-109_22194\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"size\": \"B1\",\r\n \"family\": \"B\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTI2OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "97cf0b95-0b79-497c-b2c3-035099e78fed" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:52 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "313178bd-9b0b-4d51-bf62-f02e3ba70b9d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "c90e78dc-416a-461e-9b7a-98c8eb26ad3a" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091352Z:c90e78dc-416a-461e-9b7a-98c8eb26ad3a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "2660" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp7300\",\r\n \"name\": \"csmwhp7300\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22193,\r\n \"name\": \"csmwhp7300\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1269-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1269\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-109_22193\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n },\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1269/providers/Microsoft.Web/serverfarms/csmwhp8496\",\r\n \"name\": \"csmwhp8496\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22194,\r\n \"name\": \"csmwhp8496\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1269-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 3,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1269\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-109_22194\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"size\": \"B1\",\r\n \"family\": \"B\",\r\n \"capacity\": 1\r\n }\r\n }\r\n ],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndVerifyListOfWebHostingPlan": [ - "csmwhp7300", - "csmwhp8496", - "csmrg1269" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyWebHostingPlan.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyWebHostingPlan.json deleted file mode 100644 index 249e1a3edd76..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/CreateAndVerifyWebHostingPlan.json +++ /dev/null @@ -1,283 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c8764343-ddef-4018-8cef-3582c2fa4e78" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:51 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "f2586bab-1996-446c-9ac7-cc311de3eb72" - ], - "x-ms-correlation-request-id": [ - "f2586bab-1996-446c-9ac7-cc311de3eb72" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091251Z:f2586bab-1996-446c-9ac7-cc311de3eb72" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg1298?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMTI5OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6883ff8d-afbc-471f-a922-d607c40fa4d9" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "93e24a6f-73ef-4bcc-8ad9-24566f3e14ce" - ], - "x-ms-correlation-request-id": [ - "93e24a6f-73ef-4bcc-8ad9-24566f3e14ce" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091257Z:93e24a6f-73ef-4bcc-8ad9-24566f3e14ce" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1298\",\r\n \"name\": \"csmrg1298\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1298/providers/Microsoft.Web/serverfarms/csmsf1166?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTI5OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjExNjY/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "57d6cdc0-9960-4b73-9e64-6b94ac9b055c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "116" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9289b422-46f1-4d2b-80ab-8e676b1f8789" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "d32a8055-9700-43a8-a9c9-eb0a1d7dbd40" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091311Z:d32a8055-9700-43a8-a9c9-eb0a1d7dbd40" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1307" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1298/providers/Microsoft.Web/serverfarms/csmsf1166\",\r\n \"name\": \"csmsf1166\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 21103,\r\n \"name\": \"csmsf1166\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1298-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 3,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1298\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-113_21103\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"size\": \"B1\",\r\n \"family\": \"B\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1298/providers/Microsoft.Web/serverfarms/csmsf1166?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMTI5OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjExNjY/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d0c0b358-a056-4483-9236-e064b1bb47a3" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:13:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "468739c7-cff6-4f15-a9d3-659d6431bccb" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "82f7d1dc-6c8c-41df-b559-41075e892d69" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091312Z:82f7d1dc-6c8c-41df-b559-41075e892d69" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1307" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg1298/providers/Microsoft.Web/serverfarms/csmsf1166\",\r\n \"name\": \"csmsf1166\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 21103,\r\n \"name\": \"csmsf1166\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg1298-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 3,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg1298\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-113_21103\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"B1\",\r\n \"tier\": \"Basic\",\r\n \"size\": \"B1\",\r\n \"family\": \"B\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndVerifyWebHostingPlan": [ - "csmsf1166", - "csmrg1298" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/GetAndSetAdminSiteWebHostingPlan.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/GetAndSetAdminSiteWebHostingPlan.json deleted file mode 100644 index 2ef6c39ff815..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebHostingPlanScenarioTests/GetAndSetAdminSiteWebHostingPlan.json +++ /dev/null @@ -1,437 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7db487db-cfa8-4016-a1a2-7e88d24c9038" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:11:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "2a8cb10f-9a8a-48bc-b646-64d3f023bb34" - ], - "x-ms-correlation-request-id": [ - "2a8cb10f-9a8a-48bc-b646-64d3f023bb34" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091129Z:2a8cb10f-9a8a-48bc-b646-64d3f023bb34" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg7911?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnNzkxMT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "744cb858-2f6b-4af7-b174-88e5de24c201" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:11:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "030c2f38-bd4b-434f-a627-30a67c2067ec" - ], - "x-ms-correlation-request-id": [ - "030c2f38-bd4b-434f-a627-30a67c2067ec" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091133Z:030c2f38-bd4b-434f-a627-30a67c2067ec" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911\",\r\n \"name\": \"csmrg7911\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjY3NjE/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "9c925ae7-49c3-4df6-ba35-72f0bc016e78" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "119" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:11:47 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f344f402-d099-4c36-b055-182248705aa3" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "23c9eda1-7be6-4ed7-b942-40cc745c7ef8" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091148Z:23c9eda1-7be6-4ed7-b942-40cc745c7ef8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761\",\r\n \"name\": \"csmsf6761\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 20891,\r\n \"name\": \"csmsf6761\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg7911-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg7911\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-107_20891\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjY3NjE/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"isSpot\": false,\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n },\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "410e2cf0-d03e-4a0f-8039-19574cd6b06f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "417" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:12 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "50649a3a-b0a3-4eb4-a771-e0cabd4d2699" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "e215823b-e1bb-4453-9197-6c5b453993d1" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091212Z:e215823b-e1bb-4453-9197-6c5b453993d1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1354" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761\",\r\n \"name\": \"csmsf6761\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 20891,\r\n \"name\": \"csmsf6761\",\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"capacity\": 1\r\n },\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg7911-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 1,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg7911\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-107_20891\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": null,\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/sites/csmws128?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czEyOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8eda088-1df9-4efe-b16d-826bfc61acba" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "267" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:10 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BCE5DD078B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d7670048-5310-4203-8ee9-995cf63f41c9" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "5da77b0f-033b-41d9-8c47-ff275b4ae569" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091210Z:5da77b0f-033b-41d9-8c47-ff275b4ae569" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3102" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/sites/csmws128\",\r\n \"name\": \"csmws128\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws128\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws128.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg7911-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-107.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg7911-SouthCentralUSwebspace/sites/csmws128\",\r\n \"repositorySiteName\": \"csmws128\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws128.azurewebsites.net\",\r\n \"csmws128.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws128.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws128.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:11:53.11\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws128\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.65.210.166\",\r\n \"possibleInboundIpAddresses\": \"13.65.210.166\",\r\n \"outboundIpAddresses\": \"13.65.210.166,13.65.94.45,13.65.215.127,13.65.95.197,13.84.165.200\",\r\n \"possibleOutboundIpAddresses\": \"13.65.210.166,13.65.94.45,13.65.215.127,13.65.95.197,13.84.165.200\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-107\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg7911\",\r\n \"defaultHostName\": \"csmws128.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzkxMS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc21zZjY3NjE/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7e186985-9c9d-4598-bef1-0b5dcede9d28" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:12:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c75dcbe2-1f76-4466-ade9-a6e48352d6f4" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "e64b8f2f-726e-4ad3-bad2-860cc8c850a8" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091213Z:e64b8f2f-726e-4ad3-bad2-860cc8c850a8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7911/providers/Microsoft.Web/serverfarms/csmsf6761\",\r\n \"name\": \"csmsf6761\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 20891,\r\n \"name\": \"csmsf6761\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg7911-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 1,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg7911\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-107_20891\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "GetAndSetAdminSiteWebHostingPlan": [ - "csmws128", - "csmsf6761", - "csmrg7911" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CloneSite.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CloneSite.json deleted file mode 100644 index d5c0784fed69..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CloneSite.json +++ /dev/null @@ -1,431 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "af889122-af77-4fd8-996b-01cc11c24f87" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:41:34 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "4d1eb9a6-b8e1-4c45-95f8-36c340b75acb" - ], - "x-ms-correlation-request-id": [ - "4d1eb9a6-b8e1-4c45-95f8-36c340b75acb" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094135Z:4d1eb9a6-b8e1-4c45-95f8-36c340b75acb" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "28dbe513-b34b-42fc-b015-717fc4b04858" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:42:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "c2022e83-92fa-45fd-8516-5f4231369dd6" - ], - "x-ms-correlation-request-id": [ - "c2022e83-92fa-45fd-8516-5f4231369dd6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094218Z:c2022e83-92fa-45fd-8516-5f4231369dd6" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2179?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMjE3OT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4d3d9705-a8cb-4ce3-8569-3656fb12c925" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:41:39 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "137ea639-fa6f-4168-9612-490d1d9c7870" - ], - "x-ms-correlation-request-id": [ - "137ea639-fa6f-4168-9612-490d1d9c7870" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094139Z:137ea639-fa6f-4168-9612-490d1d9c7870" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179\",\r\n \"name\": \"csmrg2179\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjE3OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAyNzg0P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"P1\",\r\n \"tier\": \"Premium\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "043cdd57-2fa8-4c8c-a610-ca1661e0f410" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "98" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:41:54 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e42180bb-9a51-4438-a774-0b919f13120f" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1194" - ], - "x-ms-correlation-request-id": [ - "8c949726-88ec-4def-9d9e-3b79e7c25b6f" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094155Z:8c949726-88ec-4def-9d9e-3b79e7c25b6f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1313" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784\",\r\n \"name\": \"csmwhp2784\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 23901,\r\n \"name\": \"csmwhp2784\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg2179-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 20,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg2179\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-135_23901\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"P1\",\r\n \"tier\": \"Premium\",\r\n \"size\": \"P1\",\r\n \"family\": \"P\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/sites/csmws9197?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjE3OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czkxOTc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8b81e314-ef29-45ce-966a-fcca42512484" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "268" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:42:16 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617C11AF81040\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "bd606bbb-430e-4af3-89f9-c804e8d10f24" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "c15e764d-d6da-4345-978c-65146553524e" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094216Z:c15e764d-d6da-4345-978c-65146553524e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3142" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/sites/csmws9197\",\r\n \"name\": \"csmws9197\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws9197\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws9197.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg2179-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-135.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg2179-SouthCentralUSwebspace/sites/csmws9197\",\r\n \"repositorySiteName\": \"csmws9197\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws9197.azurewebsites.net\",\r\n \"csmws9197.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws9197.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws9197.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:42:00.08\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws9197\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Premium\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.65.92.72\",\r\n \"possibleInboundIpAddresses\": \"13.65.92.72\",\r\n \"outboundIpAddresses\": \"13.65.92.72,13.84.166.76,13.65.92.71,13.65.93.235,13.66.55.172\",\r\n \"possibleOutboundIpAddresses\": \"13.65.92.72,13.84.166.76,13.65.92.71,13.65.93.235,13.66.55.172,13.84.54.143,157.55.192.16,40.84.157.79\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-135\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg2179\",\r\n \"defaultHostName\": \"csmws9197.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/sites/csmws9566?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjE3OS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czk1NjY/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784\",\r\n \"cloningInfo\": {\r\n \"sourceWebAppId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2179/providers/Microsoft.Web/sites/csmws9197\"\r\n }\r\n },\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a11b5696-7dc2-49a4-a3ae-43a56ae30cf4" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "375" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:42:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "498" - ], - "x-ms-request-id": [ - "2ed8d540-3f43-4441-b117-f5e9f8af9882" - ], - "x-ms-correlation-request-id": [ - "2ed8d540-3f43-4441-b117-f5e9f8af9882" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T094224Z:2ed8d540-3f43-4441-b117-f5e9f8af9882" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "843" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Azure resource /subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784 does not exist\",\r\n \"Target\": null,\r\n \"Details\": [\r\n {\r\n \"Message\": \"Azure resource /subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784 does not exist\"\r\n },\r\n {\r\n \"Code\": \"BadRequest\"\r\n },\r\n {\r\n \"ErrorEntity\": {\r\n \"ExtendedCode\": \"59720\",\r\n \"MessageTemplate\": \"Azure resource {0} does not exist\",\r\n \"Parameters\": [\r\n \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784\"\r\n ],\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Azure resource /subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2179/providers/Microsoft.Web/serverfarms/csmwhp2784 does not exist\"\r\n }\r\n }\r\n ],\r\n \"Innererror\": null\r\n}", - "StatusCode": 400 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws9197", - "csmrg2179", - "csmwhp2784" - ], - "CloneSite": [ - "csmws9566" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndDeleteWebsite.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndDeleteWebsite.json deleted file mode 100644 index cdbfe5258167..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndDeleteWebsite.json +++ /dev/null @@ -1,698 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8b0f16b3-fdbe-436a-a60b-55b6f224f133" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "22c20907-5777-49d8-878c-93811a204f82" - ], - "x-ms-correlation-request-id": [ - "22c20907-5777-49d8-878c-93811a204f82" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091934Z:22c20907-5777-49d8-878c-93811a204f82" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg340?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMzQwP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2c45628f-dffb-4c4e-bd00-b7f23100a77e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:38 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "c10834ff-e4a1-40fb-b01b-73db9f950024" - ], - "x-ms-correlation-request-id": [ - "c10834ff-e4a1-40fb-b01b-73db9f950024" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091939Z:c10834ff-e4a1-40fb-b01b-73db9f950024" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "177" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340\",\r\n \"name\": \"csmrg340\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NlcnZlcmZhcm1zL2NzbXdocDkxOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "984a6dc5-bfaa-4fc6-b333-01a2ff39b14c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:19:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "25359f73-6166-4937-b8c7-9973885ddca5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "e0ff5321-3046-4586-af49-f6ffdb1ad1f2" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091950Z:e0ff5321-3046-4586-af49-f6ffdb1ad1f2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1305" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918\",\r\n \"name\": \"csmwhp918\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 27547,\r\n \"name\": \"csmwhp918\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg340-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg340\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-125_27547\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "67f21bad-63a7-448a-9b85-e882d9ef4ceb" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "266" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE041EE3CB\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "5e9d53c4-4f9c-4ca8-8f83-f03db77bd88a" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "b9d9ee8e-c20b-4178-88c5-648610951383" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092011Z:b9d9ee8e-c20b-4178-88c5-648610951383" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3147" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728\",\r\n \"name\": \"csmws7728\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws7728\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws7728.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg340-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-125.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg340-SouthCentralUSwebspace/sites/csmws7728\",\r\n \"repositorySiteName\": \"csmws7728\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws7728.azurewebsites.net\",\r\n \"csmws7728.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws7728.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws7728.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:19:53.34\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws7728\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"104.214.110.60\",\r\n \"possibleInboundIpAddresses\": \"104.214.110.60\",\r\n \"outboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119\",\r\n \"possibleOutboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119,13.65.25.19,70.37.102.179,23.98.150.134\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-125\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg340\",\r\n \"defaultHostName\": \"csmws7728.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728/stop?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOC9zdG9wP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "90a06f10-c5d7-42be-9ae9-0819c045d3b7" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "58c44c8c-6b11-4d7a-8b27-432256f88d03" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "e01dc4f0-a0d6-474f-bc74-fea57ad72601" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092011Z:e01dc4f0-a0d6-474f-bc74-fea57ad72601" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5c1d3b44-1904-4132-baf6-dc473898f943" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE0EF4F00B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9cb58749-56c3-4ea8-9baf-1875b73c2ef9" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11992" - ], - "x-ms-correlation-request-id": [ - "7940e6ff-fa20-4d6d-ae3b-1b81b9648ca6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092013Z:7940e6ff-fa20-4d6d-ae3b-1b81b9648ca6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3150" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728\",\r\n \"name\": \"csmws7728\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws7728\",\r\n \"state\": \"Stopped\",\r\n \"hostNames\": [\r\n \"csmws7728.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg340-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-125.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg340-SouthCentralUSwebspace/sites/csmws7728\",\r\n \"repositorySiteName\": \"csmws7728\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws7728.azurewebsites.net\",\r\n \"csmws7728.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws7728.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws7728.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:20:11.6166667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws7728\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"104.214.110.60\",\r\n \"possibleInboundIpAddresses\": \"104.214.110.60\",\r\n \"outboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119\",\r\n \"possibleOutboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119,13.65.25.19,70.37.102.179,23.98.150.134\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-125\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg340\",\r\n \"defaultHostName\": \"csmws7728.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": [],\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "02421941-9447-429e-b759-05d97d133a9c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:14 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE103D82A0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "45111500-814e-4646-b824-dae3815d166f" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11991" - ], - "x-ms-correlation-request-id": [ - "f0417e01-03de-42dc-a499-646cbae0a1e0" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092014Z:f0417e01-03de-42dc-a499-646cbae0a1e0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3145" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728\",\r\n \"name\": \"csmws7728\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws7728\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws7728.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg340-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-125.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg340-SouthCentralUSwebspace/sites/csmws7728\",\r\n \"repositorySiteName\": \"csmws7728\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws7728.azurewebsites.net\",\r\n \"csmws7728.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws7728.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws7728.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/serverfarms/csmwhp918\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:20:13.77\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws7728\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"104.214.110.60\",\r\n \"possibleInboundIpAddresses\": \"104.214.110.60\",\r\n \"outboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119\",\r\n \"possibleOutboundIpAddresses\": \"104.214.110.60,13.84.49.247,13.84.51.172,13.84.52.58,13.66.60.119,13.65.25.19,70.37.102.179,23.98.150.134\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-125\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg340\",\r\n \"defaultHostName\": \"csmws7728.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": [],\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728/start?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOC9zdGFydD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1027ea48-64c8-4f42-8af1-63a5daf8d215" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d26589f8-7dda-477c-a1b6-f7e71eba2b16" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "50dc804f-1c4d-4959-99a8-7b8003809f05" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092013Z:50dc804f-1c4d-4959-99a8-7b8003809f05" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites/csmws7728?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzNzcyOD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6fd998bd-4684-4aa6-b4d8-f1c4395d71c6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE103D82A0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "34425cac-0236-45a6-8bd1-9da901afaae5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "27b3a26c-a8ce-440c-a95d-5b798f4cf70f" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092019Z:27b3a26c-a8ce-440c-a95d-5b798f4cf70f" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg340/providers/Microsoft.Web/sites?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "786304df-138a-41c2-bbf5-f9553dab0ff2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11990" - ], - "x-ms-request-id": [ - "ff4c0de7-d947-480c-8a93-177808e14428" - ], - "x-ms-correlation-request-id": [ - "ff4c0de7-d947-480c-8a93-177808e14428" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092020Z:ff4c0de7-d947-480c-8a93-177808e14428" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "12" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": []\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws7728", - "csmrg340", - "csmwhp918" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyGetOnAWebsite.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyGetOnAWebsite.json deleted file mode 100644 index a837deb5153a..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyGetOnAWebsite.json +++ /dev/null @@ -1,365 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5dc9fdca-2049-4636-860a-947203d9cfc6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:20 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-request-id": [ - "aee845c7-5a84-47de-a8b1-6f770e81014d" - ], - "x-ms-correlation-request-id": [ - "aee845c7-5a84-47de-a8b1-6f770e81014d" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092421Z:aee845c7-5a84-47de-a8b1-6f770e81014d" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg3981?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMzk4MT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ffda8528-c8db-4e3b-bdab-6f060582cbc8" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:25 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "704ff9ff-e1c4-4666-9501-136962108ad4" - ], - "x-ms-correlation-request-id": [ - "704ff9ff-e1c4-4666-9501-136962108ad4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092426Z:704ff9ff-e1c4-4666-9501-136962108ad4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981\",\r\n \"name\": \"csmrg3981\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/serverfarms/csmwhp6525?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzk4MS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHA2NTI1P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "555b89ca-6bf8-426f-94f9-7cffbb07648d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:36 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8cf074b3-fbb5-4406-81ac-ff26dae061fc" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-correlation-request-id": [ - "18d8ae64-89e1-473a-8589-5829d3688159" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092437Z:18d8ae64-89e1-473a-8589-5829d3688159" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/serverfarms/csmwhp6525\",\r\n \"name\": \"csmwhp6525\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 53246,\r\n \"name\": \"csmwhp6525\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg3981-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg3981\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-155_53246\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/sites/csmws425?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzk4MS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQyNT9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/serverfarms/csmwhp6525\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "99d713dc-e43e-4425-8bb4-ddbf69addae5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "268" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:59 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BEB07E4A60\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "07504b9c-27f9-41ef-924f-e9e0287e5688" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "05cf2cba-67f9-40f5-86d4-7304b56ff947" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092500Z:05cf2cba-67f9-40f5-86d4-7304b56ff947" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3111" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/sites/csmws425\",\r\n \"name\": \"csmws425\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws425\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws425.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg3981-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-155.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg3981-SouthCentralUSwebspace/sites/csmws425\",\r\n \"repositorySiteName\": \"csmws425\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws425.azurewebsites.net\",\r\n \"csmws425.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws425.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws425.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/serverfarms/csmwhp6525\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:24:42.52\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws425\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.39.88\",\r\n \"possibleInboundIpAddresses\": \"13.66.39.88\",\r\n \"outboundIpAddresses\": \"13.66.39.88,13.66.49.9,13.66.36.88,13.66.35.217,13.66.38.89\",\r\n \"possibleOutboundIpAddresses\": \"13.66.39.88,13.66.49.9,13.66.36.88,13.66.35.217,13.66.38.89,13.84.211.189,13.65.147.174\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-155\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg3981\",\r\n \"defaultHostName\": \"csmws425.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/sites/csmws425?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzk4MS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQyNT9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "10a3c1dc-b4be-4d55-b198-e5beca2c786a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:59 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BEB07E4A60\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6b1825d8-16dd-4b45-8b26-67cf0a616559" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "d762e9c7-f3ab-4c8c-a20d-1bd78e93a298" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092500Z:d762e9c7-f3ab-4c8c-a20d-1bd78e93a298" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3109" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/sites/csmws425\",\r\n \"name\": \"csmws425\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws425\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws425.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg3981-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-155.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg3981-SouthCentralUSwebspace/sites/csmws425\",\r\n \"repositorySiteName\": \"csmws425\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws425.azurewebsites.net\",\r\n \"csmws425.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws425.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws425.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3981/providers/Microsoft.Web/serverfarms/csmwhp6525\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:24:42.63\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws425\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.39.88\",\r\n \"possibleInboundIpAddresses\": \"13.66.39.88\",\r\n \"outboundIpAddresses\": \"13.66.39.88,13.66.49.9,13.66.36.88,13.66.35.217,13.66.38.89\",\r\n \"possibleOutboundIpAddresses\": \"13.66.39.88,13.66.49.9,13.66.36.88,13.66.35.217,13.66.38.89,13.84.211.189,13.65.147.174\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-155\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg3981\",\r\n \"defaultHostName\": \"csmws425.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": [],\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws425", - "csmrg3981", - "csmwhp6525" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyListOfWebsites.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyListOfWebsites.json deleted file mode 100644 index c6589e419143..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/CreateAndVerifyListOfWebsites.json +++ /dev/null @@ -1,362 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "68fc05d6-b73f-4c60-afb1-fb018511991b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "f61d412e-1f2d-4365-b0e8-26ea36fb86e9" - ], - "x-ms-correlation-request-id": [ - "f61d412e-1f2d-4365-b0e8-26ea36fb86e9" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092713Z:f61d412e-1f2d-4365-b0e8-26ea36fb86e9" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg674?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnNjc0P2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ea15f441-bad5-4bf0-adad-5be941b66a29" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:17 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-request-id": [ - "cbdf2d99-d9e5-4fb1-b821-0f5ca6ea6331" - ], - "x-ms-correlation-request-id": [ - "cbdf2d99-d9e5-4fb1-b821-0f5ca6ea6331" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092717Z:cbdf2d99-d9e5-4fb1-b821-0f5ca6ea6331" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "177" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674\",\r\n \"name\": \"csmrg674\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/serverfarms/csmwhp4128?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNjc0L3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NlcnZlcmZhcm1zL2NzbXdocDQxMjg/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7bc93b9a-85e5-453d-9f52-8b8930922bb2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "326f1d48-6a50-4ff8-bac0-aaa5c3090bb0" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "76b39e44-ccf6-4763-9287-c55b0f3561a1" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092728Z:76b39e44-ccf6-4763-9287-c55b0f3561a1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1308" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/serverfarms/csmwhp4128\",\r\n \"name\": \"csmwhp4128\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 68068,\r\n \"name\": \"csmwhp4128\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg674-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg674\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-159_68068\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/sites/csmws3790?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNjc0L3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzL2NzbXdzMzc5MD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/serverfarms/csmwhp4128\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "09adc29a-0d9f-41c3-8c75-4d3287d37cb2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "267" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:49 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BF15C68895\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a8bc80ee-4b88-4c50-8005-9c6309ea2a21" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "497" - ], - "x-ms-correlation-request-id": [ - "e95f7020-8eb0-4893-af7d-f51a0201d976" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092750Z:e95f7020-8eb0-4893-af7d-f51a0201d976" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3131" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/sites/csmws3790\",\r\n \"name\": \"csmws3790\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws3790\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws3790.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg674-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg674-SouthCentralUSwebspace/sites/csmws3790\",\r\n \"repositorySiteName\": \"csmws3790\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws3790.azurewebsites.net\",\r\n \"csmws3790.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws3790.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws3790.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/serverfarms/csmwhp4128\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:27:32.4733333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws3790\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg674\",\r\n \"defaultHostName\": \"csmws3790.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/sites?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNjc0L3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViL3NpdGVzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "ebcd1965-32fa-47d2-9ff5-2c259a10496d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:51 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "20499da5-6273-4db8-8adc-6906e402e59b" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "6016a240-3c6c-4207-8ac2-5e36f7dfbbc9" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092752Z:6016a240-3c6c-4207-8ac2-5e36f7dfbbc9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3169" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/sites/csmws3790\",\r\n \"name\": \"csmws3790\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws3790\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws3790.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg674-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg674-SouthCentralUSwebspace/sites/csmws3790\",\r\n \"repositorySiteName\": \"csmws3790\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws3790.azurewebsites.net\",\r\n \"csmws3790.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws3790.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws3790.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg674/providers/Microsoft.Web/serverfarms/csmwhp4128\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:27:32.5533333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws3790\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg674\",\r\n \"defaultHostName\": \"csmws3790.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws3790", - "csmrg674", - "csmwhp4128" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetNonSensitiveSiteConfigs.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetNonSensitiveSiteConfigs.json deleted file mode 100644 index e946225be4bf..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetNonSensitiveSiteConfigs.json +++ /dev/null @@ -1,509 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c30fe625-9815-4d53-81bc-37ea083b4c1f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:23:26 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "2212a209-725e-4f4b-982c-a56dd3fae460" - ], - "x-ms-correlation-request-id": [ - "2212a209-725e-4f4b-982c-a56dd3fae460" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092327Z:2212a209-725e-4f4b-982c-a56dd3fae460" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg3488?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMzQ4OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6ff817c3-04ad-4d58-ab8b-be0da94ea779" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:23:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-request-id": [ - "a4b2aedd-0e0b-4937-898e-791b2be83ced" - ], - "x-ms-correlation-request-id": [ - "a4b2aedd-0e0b-4937-898e-791b2be83ced" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092332Z:a4b2aedd-0e0b-4937-898e-791b2be83ced" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488\",\r\n \"name\": \"csmrg3488\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/serverfarms/csmwhp3510?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQ4OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAzNTEwP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "25612a31-1f18-49a3-8ce0-add9cf32ee0a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:23:44 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7c4685c0-8e6c-43a3-ac2d-c80690c1b41a" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "1bc2017d-97be-4c7d-9a69-8b694165d719" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092344Z:1bc2017d-97be-4c7d-9a69-8b694165d719" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/serverfarms/csmwhp3510\",\r\n \"name\": \"csmwhp3510\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 68067,\r\n \"name\": \"csmwhp3510\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg3488-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg3488\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-159_68067\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQ4OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI1Mj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/serverfarms/csmwhp3510\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e3708e32-f14b-4ded-a6eb-5f17bcd3534c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "268" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:07 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE90E8264B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c75684ba-7b32-401c-8b5d-646dc6d9837f" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "b9f91189-6d41-4088-afec-a847524a0127" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092407Z:b9f91189-6d41-4088-afec-a847524a0127" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3124" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252\",\r\n \"name\": \"csmws252\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws252\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws252.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg3488-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg3488-SouthCentralUSwebspace/sites/csmws252\",\r\n \"repositorySiteName\": \"csmws252\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws252.azurewebsites.net\",\r\n \"csmws252.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws252.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws252.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/serverfarms/csmwhp3510\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:23:49.3733333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws252\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg3488\",\r\n \"defaultHostName\": \"csmws252.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252/config/web?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQ4OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI1Mi9jb25maWcvd2ViP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "34342f9e-e30c-4686-9eea-3ed3efdc3e7f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:08 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f57f2dca-775d-4c80-a8c3-5ae57ac903b1" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "48bd6c2c-6960-4807-bb26-dbe0179d4dd7" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092408Z:48bd6c2c-6960-4807-bb26-dbe0179d4dd7" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3017" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252/config/web\",\r\n \"name\": \"csmws252\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"\",\r\n \"nodeVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$csmws252\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": null,\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252/config/web?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQ4OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI1Mi9jb25maWcvd2ViP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d4e6ec07-9fda-4f25-9300-b82e4850b333" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c88121dc-5b5e-4d8a-834c-8ea7fd7843dc" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-correlation-request-id": [ - "0c7b7666-8b80-4e47-b7eb-176bc498c3d8" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092410Z:0c7b7666-8b80-4e47-b7eb-176bc498c3d8" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3020" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252/config/web\",\r\n \"name\": \"csmws252\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"3.4\",\r\n \"nodeVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$csmws252\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": null,\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252/config/web?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMzQ4OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI1Mi9jb25maWcvd2ViP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"pythonVersion\": \"3.4\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5407e4bc-3462-4c79-9804-3ed02e18a0d7" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "56" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:24:09 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE90E8264B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "b06c17f3-48a4-4fae-885c-3bdb8c9d4fa2" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-correlation-request-id": [ - "1ac7404d-6f23-4292-a0b4-b93b56fed197" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092409Z:1ac7404d-6f23-4292-a0b4-b93b56fed197" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3002" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg3488/providers/Microsoft.Web/sites/csmws252\",\r\n \"name\": \"csmws252\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"3.4\",\r\n \"nodeVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$csmws252\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": null,\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null\r\n }\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws252", - "csmrg3488", - "csmwhp3510" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSensitiveSiteConfigs.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSensitiveSiteConfigs.json deleted file mode 100644 index 1f1df19a2320..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSensitiveSiteConfigs.json +++ /dev/null @@ -1,1013 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "51e2fd89-db98-4bc0-b831-4a72881572c6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-request-id": [ - "767b6263-6e0d-44e4-8b7e-ec5a3f8e9d8b" - ], - "x-ms-correlation-request-id": [ - "767b6263-6e0d-44e4-8b7e-ec5a3f8e9d8b" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092028Z:767b6263-6e0d-44e4-8b7e-ec5a3f8e9d8b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg4805?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnNDgwNT9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b9d5528e-0c45-48f0-b383-45c7e3f27c97" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "ce11ae8b-d2a2-4f72-937f-fa75464bb5f7" - ], - "x-ms-correlation-request-id": [ - "ce11ae8b-d2a2-4f72-937f-fa75464bb5f7" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092031Z:ce11ae8b-d2a2-4f72-937f-fa75464bb5f7" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805\",\r\n \"name\": \"csmrg4805\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/serverfarms/csmwhp1417?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAxNDE3P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "8d3a1d45-d2de-4c59-b596-d7de1a75461d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:20:54 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "75b00947-ce52-47e5-af95-d4d5b80012fe" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "2fa95a2f-f7bb-4e1f-978c-b435d12797d1" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092054Z:2fa95a2f-f7bb-4e1f-978c-b435d12797d1" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/serverfarms/csmwhp1417\",\r\n \"name\": \"csmwhp1417\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 68066,\r\n \"name\": \"csmwhp1417\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg4805-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg4805\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-159_68066\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzM/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/serverfarms/csmwhp1417\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3fb0765e-8264-401f-a985-7563c8d5c9b9" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "268" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:29 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE31E08DB5\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9579f928-17e1-49f2-91d0-8d98aec0e424" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "2e8036d4-bb79-4a00-849d-204b54e93dd2" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092129Z:2e8036d4-bb79-4a00-849d-204b54e93dd2" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3136" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473\",\r\n \"name\": \"csmws8473\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws8473\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws8473.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg4805-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg4805-SouthCentralUSwebspace/sites/csmws8473\",\r\n \"repositorySiteName\": \"csmws8473\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws8473.azurewebsites.net\",\r\n \"csmws8473.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws8473.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws8473.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/serverfarms/csmwhp1417\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:21:10.1433333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws8473\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg4805\",\r\n \"defaultHostName\": \"csmws8473.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/appsettings?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL2FwcHNldHRpbmdzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"Application Setting1\": \"Setting Value 1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "39b1502f-1285-4ccb-8abd-68e4548227e2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "75" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:30 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE3D8B350B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "3fe842e4-9b34-4ed0-8ccc-b8677fdbe14d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "cc07847c-341f-4c28-83ff-e5cb0fb80a3b" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092130Z:cc07847c-341f-4c28-83ff-e5cb0fb80a3b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/appsettings\",\r\n \"name\": \"appsettings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"Application Setting1\": \"Setting Value 1\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/appsettings/list?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL2FwcHNldHRpbmdzL2xpc3Q/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "02545d15-e56a-4640-8bcd-259597e9ef95" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "89256cf5-0ffd-4f37-ba57-22682b432391" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "fcc5d014-5ebd-47ba-a1a3-12c67f1de390" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092131Z:fcc5d014-5ebd-47ba-a1a3-12c67f1de390" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "322" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/appsettings\",\r\n \"name\": \"appsettings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"Application Setting1\": \"Setting Value 1\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/metadata?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL21ldGFkYXRhP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"Metadata 1\": \"Metadata Value 1\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "5ead4487-c0d4-41cc-86b9-f23e3c15e9ca" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "66" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:32 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE3F8C6940\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "17b574f8-b99e-40d0-8f5b-9fd28184f3c0" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "0b3ca1fa-d4ea-473e-a21f-66a49e7fc458" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092133Z:0b3ca1fa-d4ea-473e-a21f-66a49e7fc458" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "307" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/metadata\",\r\n \"name\": \"metadata\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"Metadata 1\": \"Metadata Value 1\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/metadata/list?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL21ldGFkYXRhL2xpc3Q/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0da2dc4b-09ad-4b0f-8950-c0d5c3eb2413" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "837b1300-6e02-40f9-90fd-95bcea13e9c3" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "7989373a-5e3e-4760-8f3a-a2dd0fd176ee" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092134Z:7989373a-5e3e-4760-8f3a-a2dd0fd176ee" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "307" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/metadata\",\r\n \"name\": \"metadata\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"Metadata 1\": \"Metadata Value 1\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/connectionstrings?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL2Nvbm5lY3Rpb25zdHJpbmdzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"ConnectionString 1\": {\r\n \"value\": \"ConnectionString Value 1\",\r\n \"type\": \"MySql\"\r\n }\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "eb082933-14a3-4eea-842c-f1246fef3dfe" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "131" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:34 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE4075DEE0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "9a2d9a14-99e8-4f5e-9ca2-434de4337043" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-correlation-request-id": [ - "6a126ab7-735b-4ac6-9fa9-929886c7dbc0" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092135Z:6a126ab7-735b-4ac6-9fa9-929886c7dbc0" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "366" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/connectionstrings\",\r\n \"name\": \"connectionstrings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"ConnectionString 1\": {\r\n \"value\": \"ConnectionString Value 1\",\r\n \"type\": \"MySql\"\r\n }\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/connectionstrings/list?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL2Nvbm5lY3Rpb25zdHJpbmdzL2xpc3Q/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "c0b6ec7b-4196-478f-94f0-995235243647" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:36 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6f51e6c3-0e1a-4f69-84cf-0137acacbf96" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "caee722d-b6a9-4c2c-8832-a4e3f57b0e75" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092137Z:caee722d-b6a9-4c2c-8832-a4e3f57b0e75" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "366" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/connectionstrings\",\r\n \"name\": \"connectionstrings\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"ConnectionString 1\": {\r\n \"value\": \"ConnectionString Value 1\",\r\n \"type\": \"MySql\"\r\n }\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/config/publishingcredentials/list?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvY29uZmlnL3B1Ymxpc2hpbmdjcmVkZW50aWFscy9saXN0P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "POST", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "cd062e00-b3b3-4fe7-8183-f11134b1be11" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:37 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6cbae116-5af0-4273-a195-176a51c475cf" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "11996" - ], - "x-ms-correlation-request-id": [ - "222a839a-1e2d-4f59-b633-2c2b3e342305" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092138Z:222a839a-1e2d-4f59-b633-2c2b3e342305" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "659" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/publishingcredentials/$csmws8473\",\r\n \"name\": \"csmws8473\",\r\n \"type\": \"Microsoft.Web/sites/publishingcredentials\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": null,\r\n \"publishingUserName\": \"$csmws8473\",\r\n \"publishingPassword\": \"tPerrm5JykApoZ4DaMjbyRtEaoskTAPgsFAl6AwseJTLiMB8gkn5FmmMiQyC\",\r\n \"publishingPasswordHash\": null,\r\n \"publishingPasswordHashSalt\": null,\r\n \"metadata\": null,\r\n \"isDeleted\": false,\r\n \"scmUri\": \"https://$csmws8473:tPerrm5JykApoZ4DaMjbyRtEaoskTAPgsFAl6AwseJTLiMB8gkn5FmmMiQyC@csmws8473.scm.azurewebsites.net\"\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473/publishxml?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzMvcHVibGlzaHhtbD9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "POST", - "RequestBody": "{\r\n \"format\": \"WebDeploy\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f8754bad-391c-40a7-88fb-f15af5037fe1" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:37 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "11999" - ], - "x-ms-request-id": [ - "69a0bd57-2a2a-459d-ae38-bc2660438cfd" - ], - "x-ms-correlation-request-id": [ - "69a0bd57-2a2a-459d-ae38-bc2660438cfd" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092138Z:69a0bd57-2a2a-459d-ae38-bc2660438cfd" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "2021" - ], - "Content-Type": [ - "application/xml" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "\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", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/sites/csmws8473?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czg0NzM/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6c408449-f6ea-4b06-b760-7d280fc434b7" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:44 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BE4075DEE0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "cbe978d5-6607-4aaa-8e27-df41dfbc83b7" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "c2202736-d717-4058-b0b8-ea9bf7c5dd41" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092145Z:c2202736-d717-4058-b0b8-ea9bf7c5dd41" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg4805/providers/Microsoft.Web/serverfarms/csmwhp1417?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNDgwNS9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAxNDE3P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "22116908-e3be-4404-b106-b1bea6bc6290" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:21:58 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e813b890-e366-4a20-b46f-7b173379386d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" - ], - "x-ms-correlation-request-id": [ - "1728470a-a1ca-4954-bc43-ebbb00dee37e" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092158Z:1728470a-a1ca-4954-bc43-ebbb00dee37e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws8473", - "csmrg4805", - "csmwhp1417" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSiteLimits.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSiteLimits.json deleted file mode 100644 index 80035ac3a0f5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSiteLimits.json +++ /dev/null @@ -1,575 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "d27a78b5-6ad0-4aab-bf02-625ada018355" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:16 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-request-id": [ - "b847f3ae-c3b2-4b6f-97e8-6c8a90337f92" - ], - "x-ms-correlation-request-id": [ - "b847f3ae-c3b2-4b6f-97e8-6c8a90337f92" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092616Z:b847f3ae-c3b2-4b6f-97e8-6c8a90337f92" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg9072?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnOTA3Mj9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "0ca698b4-d09e-4328-ba23-6654d9381c41" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "797644b7-99b0-42e0-bd71-f5a02fe3d8ce" - ], - "x-ms-correlation-request-id": [ - "797644b7-99b0-42e0-bd71-f5a02fe3d8ce" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092619Z:797644b7-99b0-42e0-bd71-f5a02fe3d8ce" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072\",\r\n \"name\": \"csmrg9072\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/serverfarms/cswhp525?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc3docDUyNT9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "670b4944-3d7c-442a-9872-0b048aa4c8d2" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "117" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:31 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "0aef6609-03de-45c0-9f33-1dec28b243c8" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "9c8fce6d-6249-474f-bcb2-54d773105111" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092631Z:9c8fce6d-6249-474f-bcb2-54d773105111" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1305" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/serverfarms/cswhp525\",\r\n \"name\": \"cswhp525\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 22672,\r\n \"name\": \"cswhp525\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg9072-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg9072\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-105_22672\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czkzNDc/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg9072/providers/Microsoft.Web/serverfarms/cswhp525\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7f38d8de-2cef-4c5c-bbc4-b7484da63c95" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "208" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:51 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BEF3928820\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "50d22cfa-bb80-42d9-9995-1f690f0cd231" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "a353dde1-d3ea-46f8-b65d-5f5c6ba75bce" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092651Z:a353dde1-d3ea-46f8-b65d-5f5c6ba75bce" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3064" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347\",\r\n \"name\": \"csmws9347\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws9347\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws9347.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg9072-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-105.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg9072-SouthCentralUSwebspace/sites/csmws9347\",\r\n \"repositorySiteName\": \"csmws9347\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws9347.azurewebsites.net\",\r\n \"csmws9347.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws9347.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws9347.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/serverfarms/cswhp525\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:26:35.1033333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws9347\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"40.74.253.108\",\r\n \"possibleInboundIpAddresses\": \"40.74.253.108\",\r\n \"outboundIpAddresses\": \"40.74.253.108,13.65.192.100,13.65.145.208,13.65.151.204,13.65.147.248\",\r\n \"possibleOutboundIpAddresses\": \"40.74.253.108,13.65.192.100,13.65.145.208,13.65.151.204,13.65.147.248\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-105\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg9072\",\r\n \"defaultHostName\": \"csmws9347.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347/config/web?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czkzNDcvY29uZmlnL3dlYj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"limits\": {\r\n \"maxPercentageCpu\": 70.5,\r\n \"maxMemoryInMb\": 1024,\r\n \"maxDiskSizeInMb\": 512\r\n }\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "89529774-aa42-4720-87aa-96c366554d46" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "145" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:52 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BEF3928820\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "e17d241c-38f1-4093-9f5e-15a3b02efa96" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "57139ba8-9115-4607-a0ff-b59ac767475c" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092653Z:57139ba8-9115-4607-a0ff-b59ac767475c" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3031" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347\",\r\n \"name\": \"csmws9347\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"\",\r\n \"nodeVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$csmws9347\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": {\r\n \"maxPercentageCpu\": 70.5,\r\n \"maxMemoryInMb\": 1024,\r\n \"maxDiskSizeInMb\": 512\r\n },\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347/config/web?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czkzNDcvY29uZmlnL3dlYj9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "e1d9a41b-6c56-4084-90fe-77c767196697" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:53 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "fd64645e-40e6-4007-aaac-20e8f6e150b4" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "b3649c91-f2ea-4d75-92f7-6c5b1aa05e52" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092653Z:b3649c91-f2ea-4d75-92f7-6c5b1aa05e52" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3049" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347/config/web\",\r\n \"name\": \"csmws9347\",\r\n \"type\": \"Microsoft.Web/sites/config\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"numberOfWorkers\": 1,\r\n \"defaultDocuments\": [\r\n \"Default.htm\",\r\n \"Default.html\",\r\n \"Default.asp\",\r\n \"index.htm\",\r\n \"index.html\",\r\n \"iisstart.htm\",\r\n \"default.aspx\",\r\n \"index.php\",\r\n \"hostingstart.html\"\r\n ],\r\n \"netFrameworkVersion\": \"v4.0\",\r\n \"phpVersion\": \"5.6\",\r\n \"pythonVersion\": \"\",\r\n \"nodeVersion\": \"\",\r\n \"linuxFxVersion\": \"\",\r\n \"windowsFxVersion\": null,\r\n \"requestTracingEnabled\": false,\r\n \"remoteDebuggingEnabled\": false,\r\n \"remoteDebuggingVersion\": null,\r\n \"httpLoggingEnabled\": false,\r\n \"azureMonitorLogCategories\": null,\r\n \"logsDirectorySizeLimit\": 35,\r\n \"detailedErrorLoggingEnabled\": false,\r\n \"publishingUsername\": \"$csmws9347\",\r\n \"publishingPassword\": null,\r\n \"appSettings\": null,\r\n \"metadata\": null,\r\n \"connectionStrings\": null,\r\n \"machineKey\": null,\r\n \"handlerMappings\": null,\r\n \"documentRoot\": null,\r\n \"scmType\": \"None\",\r\n \"use32BitWorkerProcess\": true,\r\n \"webSocketsEnabled\": false,\r\n \"alwaysOn\": false,\r\n \"javaVersion\": null,\r\n \"javaContainer\": null,\r\n \"javaContainerVersion\": null,\r\n \"appCommandLine\": \"\",\r\n \"managedPipelineMode\": \"Integrated\",\r\n \"virtualApplications\": [\r\n {\r\n \"virtualPath\": \"/\",\r\n \"physicalPath\": \"site\\\\wwwroot\",\r\n \"preloadEnabled\": false,\r\n \"virtualDirectories\": null\r\n }\r\n ],\r\n \"winAuthAdminState\": 0,\r\n \"winAuthTenantState\": 0,\r\n \"customAppPoolIdentityAdminState\": false,\r\n \"customAppPoolIdentityTenantState\": false,\r\n \"runtimeADUser\": null,\r\n \"runtimeADUserPassword\": null,\r\n \"loadBalancing\": \"LeastRequests\",\r\n \"routingRules\": [],\r\n \"experiments\": {\r\n \"rampUpRules\": []\r\n },\r\n \"limits\": {\r\n \"maxPercentageCpu\": 70.5,\r\n \"maxMemoryInMb\": 1024,\r\n \"maxDiskSizeInMb\": 512\r\n },\r\n \"autoHealEnabled\": false,\r\n \"autoHealRules\": null,\r\n \"tracingOptions\": null,\r\n \"vnetName\": \"\",\r\n \"siteAuthEnabled\": false,\r\n \"siteAuthSettings\": {\r\n \"enabled\": null,\r\n \"unauthenticatedClientAction\": null,\r\n \"tokenStoreEnabled\": null,\r\n \"allowedExternalRedirectUrls\": null,\r\n \"defaultProvider\": null,\r\n \"clientId\": null,\r\n \"clientSecret\": null,\r\n \"clientSecretCertificateThumbprint\": null,\r\n \"issuer\": null,\r\n \"allowedAudiences\": null,\r\n \"additionalLoginParams\": null,\r\n \"isAadAutoProvisioned\": false,\r\n \"googleClientId\": null,\r\n \"googleClientSecret\": null,\r\n \"googleOAuthScopes\": null,\r\n \"facebookAppId\": null,\r\n \"facebookAppSecret\": null,\r\n \"facebookOAuthScopes\": null,\r\n \"twitterConsumerKey\": null,\r\n \"twitterConsumerSecret\": null,\r\n \"microsoftAccountClientId\": null,\r\n \"microsoftAccountClientSecret\": null,\r\n \"microsoftAccountOAuthScopes\": null\r\n },\r\n \"cors\": null,\r\n \"push\": null,\r\n \"apiDefinition\": null,\r\n \"apiManagementConfig\": null,\r\n \"autoSwapSlotName\": null,\r\n \"localMySqlEnabled\": false,\r\n \"managedServiceIdentityId\": null,\r\n \"xManagedServiceIdentityId\": null,\r\n \"ipSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictions\": [\r\n {\r\n \"ipAddress\": \"Any\",\r\n \"action\": \"Allow\",\r\n \"priority\": 1,\r\n \"name\": \"Allow all\",\r\n \"description\": \"Allow all access\"\r\n }\r\n ],\r\n \"scmIpSecurityRestrictionsUseMain\": false,\r\n \"http20Enabled\": false,\r\n \"minTlsVersion\": \"1.2\",\r\n \"ftpsState\": \"AllAllowed\",\r\n \"preWarmedInstanceCount\": 0,\r\n \"healthCheckPath\": null,\r\n \"fileChangeAuditEnabled\": false,\r\n \"functionsRuntimeScaleMonitoringEnabled\": false,\r\n \"websiteTimeZone\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/sites/csmws9347?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czkzNDc/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a7f48df1-a76c-4e97-bc2e-017dda23303f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:58 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BEFDE96C4B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d18f52b8-a49d-4db1-b848-90dd4af89da5" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "bf9a3936-7d26-4770-a5e5-eab84ee0d96e" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092658Z:bf9a3936-7d26-4770-a5e5-eab84ee0d96e" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9072/providers/Microsoft.Web/serverfarms/cswhp525?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTA3Mi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc3docDUyNT9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "751cbbaf-8ec5-4cf5-81a6-a6fcfb464810" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:27:00 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "c2a8a0ed-2ae2-4757-818d-8f36b100b4d6" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "5d593b8e-7027-448d-b127-d6536b7410e6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092701Z:5d593b8e-7027-448d-b127-d6536b7410e6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "GetAndSetSiteLimits": [ - "cswhp525", - "csmrg9072", - "csmws9347" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSlotSettingsConfigs.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSlotSettingsConfigs.json deleted file mode 100644 index 671332451022..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/GetAndSetSlotSettingsConfigs.json +++ /dev/null @@ -1,572 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "da2151e3-3ba5-48e7-98c8-69afa178492e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:08 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "c969e18e-450b-45d4-9ec6-e9cb26a0a635" - ], - "x-ms-correlation-request-id": [ - "c969e18e-450b-45d4-9ec6-e9cb26a0a635" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092508Z:c969e18e-450b-45d4-9ec6-e9cb26a0a635" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg8664?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnODY2ND9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "a0ab7847-0390-491d-9bab-23c3b85a1a3b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:13 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "ba16e99a-0fb8-4f67-a7e3-ec606b3b1ce1" - ], - "x-ms-correlation-request-id": [ - "ba16e99a-0fb8-4f67-a7e3-ec606b3b1ce1" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092513Z:ba16e99a-0fb8-4f67-a7e3-ec606b3b1ce1" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664\",\r\n \"name\": \"csmrg8664\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/serverfarms/csmwhp366?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAzNjY/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "7cd7b88b-2384-459c-ad8a-13f410411347" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "97" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "edc57d25-4c7d-4163-b0f5-0f7d4f595199" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-correlation-request-id": [ - "fb6145a0-3b10-41f1-9e73-11c78b1d2a96" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092534Z:fb6145a0-3b10-41f1-9e73-11c78b1d2a96" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1308" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/serverfarms/csmwhp366\",\r\n \"name\": \"csmwhp366\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 34888,\r\n \"name\": \"csmwhp366\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg8664-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Shared\",\r\n \"siteMode\": \"Basic\",\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg8664\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-149_34888\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/sites/csmws6291?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czYyOTE/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/serverfarms/csmwhp366\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "864d10a3-3935-4457-9777-561fdcf81951" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "267" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:55 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BED208EB75\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "2b86c7a0-f9d9-4e7d-a484-751e73c0e046" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "83972840-afd7-4c40-b6d6-2c951f9c83f4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092556Z:83972840-afd7-4c40-b6d6-2c951f9c83f4" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3150" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/sites/csmws6291\",\r\n \"name\": \"csmws6291\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws6291\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws6291.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg8664-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-149.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg8664-SouthCentralUSwebspace/sites/csmws6291\",\r\n \"repositorySiteName\": \"csmws6291\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws6291.azurewebsites.net\",\r\n \"csmws6291.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws6291.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws6291.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/serverfarms/csmwhp366\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:25:38.79\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws6291\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.65.212.252\",\r\n \"possibleInboundIpAddresses\": \"13.65.212.252\",\r\n \"outboundIpAddresses\": \"13.65.212.252,13.66.37.235,13.66.36.172,13.84.40.155,13.66.37.11\",\r\n \"possibleOutboundIpAddresses\": \"13.65.212.252,13.66.37.235,13.66.36.172,13.84.40.155,13.66.37.11,40.84.136.198,23.98.144.222,23.98.128.142\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-149\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg8664\",\r\n \"defaultHostName\": \"csmws6291.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/sites/csmws6291/config/slotConfigNames?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czYyOTEvY29uZmlnL3Nsb3RDb25maWdOYW1lcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"ConnString1\",\r\n \"ConnString2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"AppSetting1\",\r\n \"AppSetting2\"\r\n ]\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4546ec32-5211-49b1-988e-4027c418e6ad" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "187" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:56 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "18a0e8b0-5d8c-4284-8b60-76fb4d492a0a" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1196" - ], - "x-ms-correlation-request-id": [ - "4dedbe3e-3a50-445f-8c91-f3d4ee5df231" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092557Z:4dedbe3e-3a50-445f-8c91-f3d4ee5df231" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "270" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"csmws6291\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"ConnString1\",\r\n \"ConnString2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"AppSetting1\",\r\n \"AppSetting2\"\r\n ],\r\n \"azureStorageConfigNames\": []\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/sites/csmws6291/config/slotConfigNames?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czYyOTEvY29uZmlnL3Nsb3RDb25maWdOYW1lcz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2c3b9407-a18e-43cd-86da-780df9623fa5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:25:57 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "a47c5176-2bd8-4f65-80de-584137697aec" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "2de200e9-2da5-4746-b7ec-39951e0ffbd6" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092557Z:2de200e9-2da5-4746-b7ec-39951e0ffbd6" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "270" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"csmws6291\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"connectionStringNames\": [\r\n \"ConnString1\",\r\n \"ConnString2\"\r\n ],\r\n \"appSettingNames\": [\r\n \"AppSetting1\",\r\n \"AppSetting2\"\r\n ],\r\n \"azureStorageConfigNames\": []\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/sites/csmws6291?deleteMetrics=true&api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czYyOTE/ZGVsZXRlTWV0cmljcz10cnVlJmFwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2ee73287-f6f6-49c1-a2a2-72ca9ef98ffd" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BED208EB75\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d29b8974-8209-40be-9e56-0f2b70a69c3d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14998" - ], - "x-ms-correlation-request-id": [ - "036db57c-118a-4eed-8945-b8624f912e73" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092603Z:036db57c-118a-4eed-8945-b8624f912e73" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg8664/providers/Microsoft.Web/serverfarms/csmwhp366?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnODY2NC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHAzNjY/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "246ee0db-74c5-47e4-b5df-7d3ea4100503" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:26:06 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "dda11496-e335-44c8-82d6-352e85250be3" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14997" - ], - "x-ms-correlation-request-id": [ - "0363554f-36bd-4133-91b9-dec3734e2203" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T092607Z:0363554f-36bd-4133-91b9-dec3734e2203" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws6291", - "csmrg8664", - "csmwhp366" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/LinkAndUnlinkSourceControlToWebsiteShouldSucceed.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/LinkAndUnlinkSourceControlToWebsiteShouldSucceed.json deleted file mode 100644 index 4dcc08f4741d..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteScenarioTests/LinkAndUnlinkSourceControlToWebsiteShouldSucceed.json +++ /dev/null @@ -1,422 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/providers/Microsoft.Web?api-version=2015-11-01", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "456f242a-8da9-4a97-a3f1-5ac91749aa31" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/3.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"sites/extensions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/extensions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/instances\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/instances\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/instances/extensions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/instances/extensions\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01-alpha\",\r\n \"2015-08-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01-alpha\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-02\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01-privatepreview\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-02\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01-alpha\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-02\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metrics\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/metricDefinitions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metrics\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/metricDefinitions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"webquotas\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premierAddOns\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2015-08-01-privatepreview\",\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\"\r\n ],\r\n \"apiVersions\": [\r\n \"2015-08-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01-privatepreview\",\r\n \"2015-04-01\",\r\n \"2015-02-01-privatepreview\",\r\n \"2015-02-01\",\r\n \"2014-11-01-privatepreview\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-privatepreview\",\r\n \"2014-04-01\"\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": [ - "Fri, 11 Dec 2015 01:29:52 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Vary": [ - "Accept-Encoding" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "14770" - ], - "x-ms-request-id": [ - "b670f9e9-8a50-4f86-b0fc-3eaa3cde0c30" - ], - "x-ms-correlation-request-id": [ - "b670f9e9-8a50-4f86-b0fc-3eaa3cde0c30" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T012952Z:b670f9e9-8a50-4f86-b0fc-3eaa3cde0c30" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourcegroups/csmrg2628?api-version=2015-11-01", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\"\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "29" - ], - "x-ms-client-request-id": [ - "b45a30df-9935-4ca3-af1b-2828135d400f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.Resources.ResourceManagementClient/3.0.0.0" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628\",\r\n \"name\": \"csmrg2628\",\r\n \"location\": \"westus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "171" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:29:52 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "987" - ], - "x-ms-request-id": [ - "8eaf5349-c258-4501-8f6f-e36ff970235b" - ], - "x-ms-correlation-request-id": [ - "8eaf5349-c258-4501-8f6f-e36ff970235b" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T012953Z:8eaf5349-c258-4501-8f6f-e36ff970235b" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ] - }, - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/serverfarms/csmwhp6158?api-version=2015-08-01", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\"\r\n },\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"name\": \"csmwhp6158\"\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "139" - ], - "x-ms-client-request-id": [ - "80a8534a-ab66-4771-a480-1fb7526c0d5f" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/serverfarms/csmwhp6158\",\r\n \"name\": \"csmwhp6158\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"location\": \"West US\",\r\n \"tags\": null,\r\n \"properties\": {\r\n \"serverFarmId\": 0,\r\n \"name\": \"csmwhp6158\",\r\n \"workerSize\": 0,\r\n \"workerSizeId\": 0,\r\n \"numberOfWorkers\": 0,\r\n \"currentWorkerSize\": 0,\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 0,\r\n \"status\": 0,\r\n \"webSpace\": \"csmrg2628-WestUSwebspace\",\r\n \"subscription\": \"3312c132-fc40-493f-9c97-82d80256a313\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 1,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": 0,\r\n \"siteMode\": null,\r\n \"geoRegion\": \"West US\",\r\n \"perSiteScaling\": false,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"kind\": null,\r\n \"resourceGroup\": \"csmrg2628\"\r\n },\r\n \"sku\": {\r\n \"name\": \"D1\",\r\n \"tier\": \"Shared\",\r\n \"size\": \"D1\",\r\n \"family\": \"D\",\r\n \"capacity\": 0\r\n }\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:29:57 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7ca1d8bc-f07b-4210-bb1e-0a8532dba4a4" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1060" - ], - "x-ms-correlation-request-id": [ - "8ddae76d-7fb3-410c-b908-fec955d94e47" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T012957Z:8ddae76d-7fb3-410c-b908-fec955d94e47" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/sites/csmws985?api-version=2015-08-01", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws985\",\r\n \"serverFarmId\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/serverfarms/csmwhp6158\"\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "284" - ], - "x-ms-client-request-id": [ - "c465038b-15a9-4b59-8401-bd54cbe443e8" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/sites/csmws985\",\r\n \"name\": \"csmws985\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"location\": \"West US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws985\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws985.waws-ppedf.windows-int.net\"\r\n ],\r\n \"webSpace\": \"csmrg2628-WestUSwebspace\",\r\n \"selfLink\": \"https://waws-ppedf-bay-001.api.admin-waws-ppedf.windows-int.net:454/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/webspaces/csmrg2628-WestUSwebspace/sites/csmws985\",\r\n \"repositorySiteName\": \"csmws985\",\r\n \"owner\": null,\r\n \"usageState\": 0,\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws985.scm.waws-ppedf.windows-int.net\",\r\n \"csmws985.waws-ppedf.windows-int.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": 0,\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws985.scm.waws-ppedf.windows-int.net\",\r\n \"sslState\": 0,\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": 0,\r\n \"hostType\": 1\r\n },\r\n {\r\n \"name\": \"csmws985.waws-ppedf.windows-int.net\",\r\n \"sslState\": 0,\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": 0,\r\n \"hostType\": 0\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/serverfarms/csmwhp6158\",\r\n \"lastModifiedTimeUtc\": \"2015-12-11T01:30:04.357\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": 0,\r\n \"runtimeAvailabilityState\": 0,\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws985\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Shared\",\r\n \"premiumAppDeployed\": null,\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"microService\": \"WebSites\",\r\n \"gatewaySiteName\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"kind\": null,\r\n \"outboundIpAddresses\": \"104.40.21.237,104.40.20.76,104.40.19.34,104.40.22.12\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n }\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:30:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "367de807-e17d-4526-aae0-7f7fe63505ac" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1059" - ], - "x-ms-correlation-request-id": [ - "55e788cc-767f-408f-b2ad-1b90094256f1" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T013003Z:55e788cc-767f-408f-b2ad-1b90094256f1" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/providers/Microsoft.Web/sourcecontrols/GitHub?api-version=2015-08-01", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"West US\",\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"36c7290f81fda5877d52d2fc3fbc7c31acd25051\"\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "134" - ], - "x-ms-client-request-id": [ - "ec3b939c-f845-49ec-b0a4-c6a54313509e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"id\": null,\r\n \"name\": \"GitHub\",\r\n \"type\": \"Microsoft.Web/sourcecontrols\",\r\n \"location\": null,\r\n \"tags\": null,\r\n \"properties\": {\r\n \"name\": \"GitHub\",\r\n \"token\": \"36c7290f81fda5877d52d2fc3fbc7c31acd25051\",\r\n \"tokenSecret\": null,\r\n \"refreshToken\": null,\r\n \"expirationTime\": null\r\n }\r\n}", - "ResponseHeaders": { - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:30:04 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Transfer-Encoding": [ - "chunked" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Vary": [ - "Accept-Encoding" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7522f00a-d378-451f-b7ff-c19124099eb6" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-tenant-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "3f5fe0c8-e1ec-4286-b771-fe4a99a3f0c3" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T013004Z:3f5fe0c8-e1ec-4286-b771-fe4a99a3f0c3" - ] - }, - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/3312c132-fc40-493f-9c97-82d80256a313/resourceGroups/csmrg2628/providers/Microsoft.Web/sites/csmws985/sourcecontrols/web?api-version=2015-08-01", - "RequestMethod": "PATCH", - "RequestBody": "{\r\n \"properties\": {\r\n \"repoUrl\": \"https://github.com/amitaptest/HelloKudu\"\r\n }\r\n}", - "RequestHeaders": { - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "86" - ], - "x-ms-client-request-id": [ - "56e35a3b-dab8-41fb-bb44-ee831845be27" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/1.0.0.1" - ], - "Accept": [ - "application/json" - ] - }, - "ResponseBody": "{\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Repository 'UpdateSiteSourceControl' operation failed with Microsoft.Web.Hosting.SourceControls.OAuthException: GitHub GetRepository: Bad credentials\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__99`1.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__19.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.Administration.GitHubSiteRepositoryProvider.d__6.MoveNext().\",\r\n \"Target\": null,\r\n \"Details\": [\r\n {\r\n \"Message\": \"Repository 'UpdateSiteSourceControl' operation failed with Microsoft.Web.Hosting.SourceControls.OAuthException: GitHub GetRepository: Bad credentials\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__99`1.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__19.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.Administration.GitHubSiteRepositoryProvider.d__6.MoveNext().\"\r\n },\r\n {\r\n \"Code\": \"BadRequest\"\r\n },\r\n {\r\n \"ErrorEntity\": {\r\n \"Code\": \"BadRequest\",\r\n \"Message\": \"Repository 'UpdateSiteSourceControl' operation failed with Microsoft.Web.Hosting.SourceControls.OAuthException: GitHub GetRepository: Bad credentials\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__99`1.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__19.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.Administration.GitHubSiteRepositoryProvider.d__6.MoveNext().\",\r\n \"ExtendedCode\": \"05007\",\r\n \"MessageTemplate\": \"Repository '{0}' operation failed with {1}.\",\r\n \"Parameters\": [\r\n \"UpdateSiteSourceControl\",\r\n \"Microsoft.Web.Hosting.SourceControls.OAuthException: GitHub GetRepository: Bad credentials\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__99`1.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.SourceControls.GitHubProxy.d__19.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\\r\\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n at Microsoft.Web.Hosting.Administration.GitHubSiteRepositoryProvider.d__6.MoveNext()\"\r\n ],\r\n \"InnerErrors\": null\r\n }\r\n }\r\n ],\r\n \"Innererror\": null\r\n}", - "ResponseHeaders": { - "Content-Length": [ - "4192" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ], - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Fri, 11 Dec 2015 01:30:06 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D133B3761E8810\"" - ], - "Server": [ - "Microsoft-IIS/8.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1072" - ], - "x-ms-request-id": [ - "5f5c1b6b-59b1-488d-879f-2fa7d2752098" - ], - "x-ms-correlation-request-id": [ - "5f5c1b6b-59b1-488d-879f-2fa7d2752098" - ], - "x-ms-routing-request-id": [ - "CENTRALUS:20151211T013006Z:5f5c1b6b-59b1-488d-879f-2fa7d2752098" - ] - }, - "StatusCode": 400 - } - ], - "Names": { - "RunWebsiteTestScenario": [ - "csmws985", - "csmrg2628", - "csmwhp6158" - ] - }, - "Variables": { - "SubscriptionId": "3312c132-fc40-493f-9c97-82d80256a313" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndDeleteWebSiteSlot.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndDeleteWebSiteSlot.json deleted file mode 100644 index 80b4fda9dbb5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndDeleteWebSiteSlot.json +++ /dev/null @@ -1,509 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4e759d5e-3bec-4f9d-b6e1-0e873112af60" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:14:02 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-request-id": [ - "614062fc-68da-4711-af8d-5f4ba2a1ab98" - ], - "x-ms-correlation-request-id": [ - "614062fc-68da-4711-af8d-5f4ba2a1ab98" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091402Z:614062fc-68da-4711-af8d-5f4ba2a1ab98" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2616?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnMjYxNj9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "6d27b460-9381-4109-8acb-065bd551ce7b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:14:06 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-request-id": [ - "b5bef14c-4f45-4284-84ec-f6f230042174" - ], - "x-ms-correlation-request-id": [ - "b5bef14c-4f45-4284-84ec-f6f230042174" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091407Z:b5bef14c-4f45-4284-84ec-f6f230042174" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616\",\r\n \"name\": \"csmrg2616\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjYxNi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHA0NTMzP2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "612fbde5-c637-408a-8f2c-ac5703b2886a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "119" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:14:23 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "032abf57-9fd0-469e-9981-4f4c594a4b9e" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "d2093ece-24ca-4274-8c98-30e141e0440a" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091423Z:d2093ece-24ca-4274-8c98-30e141e0440a" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1314" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533\",\r\n \"name\": \"csmwhp4533\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 68064,\r\n \"name\": \"csmwhp4533\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg2616-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg2616\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-159_68064\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjYxNi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI3NzI/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b76e6c65-89d8-4211-b4fc-901a99138c44" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "210" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:14:44 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD41DF0140\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "749326cf-6fd4-4b6e-b67d-b0bba890aa6d" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "1d068c1d-6ff9-4d7d-bc3c-73794303ae92" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091444Z:1d068c1d-6ff9-4d7d-bc3c-73794303ae92" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3075" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772\",\r\n \"name\": \"csmws2772\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws2772\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws2772.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg2616-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg2616-SouthCentralUSwebspace/sites/csmws2772\",\r\n \"repositorySiteName\": \"csmws2772\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws2772.azurewebsites.net\",\r\n \"csmws2772.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws2772.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws2772.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:14:27.48\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws2772\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg2616\",\r\n \"defaultHostName\": \"csmws2772.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772/slots/staging?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjYxNi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI3NzIvc2xvdHMvc3RhZ2luZz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "87ab6dad-a5a7-44f3-a63b-b6bf9ae82158" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "210" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:05 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD41DF0140\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "be01eb8d-7066-4d1d-9b55-50e78e93cb2e" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "a2bc81a9-6131-47f9-9eb6-a4825602759d" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091506Z:a2bc81a9-6131-47f9-9eb6-a4825602759d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3166" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772/slots/staging\",\r\n \"name\": \"csmws2772/staging\",\r\n \"type\": \"Microsoft.Web/sites/slots\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws2772(staging)\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws2772-staging.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg2616-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-159.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg2616-SouthCentralUSwebspace/sites/csmws2772\",\r\n \"repositorySiteName\": \"csmws2772\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws2772-staging.azurewebsites.net\",\r\n \"csmws2772-staging.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws2772-staging.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws2772-staging.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/serverfarms/csmwhp4533\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:14:49.17\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws2772__929e\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.66.16.101\",\r\n \"possibleInboundIpAddresses\": \"13.66.16.101\",\r\n \"outboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183\",\r\n \"possibleOutboundIpAddresses\": \"13.66.16.101,13.66.35.97,13.66.21.249,13.66.20.98,13.66.33.183,52.171.216.165,13.85.31.117\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-159\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg2616\",\r\n \"defaultHostName\": \"csmws2772-staging.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772/slots/staging?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjYxNi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI3NzIvc2xvdHMvc3RhZ2luZz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "DELETE", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "62cfe240-94d3-4d52-9bdc-bdd52a7d4570" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD4F3772A0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "8783c676-c15f-417e-b171-9900efc15f86" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-deletes": [ - "14999" - ], - "x-ms-correlation-request-id": [ - "5e02efe0-ef26-4cf7-bd97-3e48f163697d" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091511Z:5e02efe0-ef26-4cf7-bd97-3e48f163697d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "0" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg2616/providers/Microsoft.Web/sites/csmws2772/slots?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnMjYxNi9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czI3NzIvc2xvdHM/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4dda11a5-bf56-45b9-ba93-06708bf707e5" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:11 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "14dd9cc3-c9d8-4141-9083-cd565af9e39b" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11998" - ], - "x-ms-correlation-request-id": [ - "d502650c-def8-40e0-b618-91dc85352302" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091512Z:d502650c-def8-40e0-b618-91dc85352302" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "38" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndDeleteWebSiteSlot": [ - "csmws2772", - "csmrg2616", - "csmwhp4533" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyGetOnAWebsiteSlot.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyGetOnAWebsiteSlot.json deleted file mode 100644 index 0d85b3e101ee..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyGetOnAWebsiteSlot.json +++ /dev/null @@ -1,443 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "2424cb00-9360-415b-b3cf-21b67b34684d" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:20 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11994" - ], - "x-ms-request-id": [ - "61245401-86de-4a4a-a089-248ae96a3988" - ], - "x-ms-correlation-request-id": [ - "61245401-86de-4a4a-a089-248ae96a3988" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091521Z:61245401-86de-4a4a-a089-248ae96a3988" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg9410?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnOTQxMD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1eb26998-9147-4a58-9d68-e54d92a70214" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:24 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1197" - ], - "x-ms-request-id": [ - "831d34fa-236d-43c2-ba30-a73d24e4b0fe" - ], - "x-ms-correlation-request-id": [ - "831d34fa-236d-43c2-ba30-a73d24e4b0fe" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091525Z:831d34fa-236d-43c2-ba30-a73d24e4b0fe" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410\",\r\n \"name\": \"csmrg9410\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTQxMC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc3docDExNDg/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "f00950f4-b80e-4355-b6c8-cf3a142e0495" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "99" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:37 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "041b21fb-08f1-4c4e-8556-97a3cba78366" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1199" - ], - "x-ms-correlation-request-id": [ - "029954e3-0743-4880-8b55-825fdee7fce9" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091537Z:029954e3-0743-4880-8b55-825fdee7fce9" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1311" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\",\r\n \"name\": \"cswhp1148\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 57614,\r\n \"name\": \"cswhp1148\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg9410-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg9410\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-141_57614\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTQxMC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czk1Mjk/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\"\r\n },\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n }\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "3ae73222-f0df-4b7e-b2a6-50b25f1164e0" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "267" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:15:59 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD6EB11B0B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "6692c95e-4f5f-4838-82ca-c7aded819a09" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "65af2f41-2ae7-4dda-9fdd-afe519d79486" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091559Z:65af2f41-2ae7-4dda-9fdd-afe519d79486" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3138" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529\",\r\n \"name\": \"csmws9529\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"properties\": {\r\n \"name\": \"csmws9529\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws9529.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg9410-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-141.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg9410-SouthCentralUSwebspace/sites/csmws9529\",\r\n \"repositorySiteName\": \"csmws9529\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws9529.azurewebsites.net\",\r\n \"csmws9529.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws9529.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws9529.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:15:42.6633333\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws9529\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"52.171.56.101\",\r\n \"possibleInboundIpAddresses\": \"52.171.56.101\",\r\n \"outboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98\",\r\n \"possibleOutboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98,13.84.44.203,13.84.41.82\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-141\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": {\r\n \"tag1\": \"value1\",\r\n \"tag2\": \"\"\r\n },\r\n \"resourceGroup\": \"csmrg9410\",\r\n \"defaultHostName\": \"csmws9529.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529/slots/staging?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTQxMC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czk1Mjkvc2xvdHMvc3RhZ2luZz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "77ecfdc7-51ce-4d26-bcdd-abc7f9a56922" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "209" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:16:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD6EB11B0B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "657284a4-16e4-4afd-8564-76ab18c9148f" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "d809f7e6-c15e-459c-941f-6481a12b2455" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091620Z:d809f7e6-c15e-459c-941f-6481a12b2455" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3171" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529/slots/staging\",\r\n \"name\": \"csmws9529/staging\",\r\n \"type\": \"Microsoft.Web/sites/slots\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws9529(staging)\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws9529-staging.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg9410-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-141.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg9410-SouthCentralUSwebspace/sites/csmws9529\",\r\n \"repositorySiteName\": \"csmws9529\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws9529-staging.azurewebsites.net\",\r\n \"csmws9529-staging.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws9529-staging.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws9529-staging.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:16:02.6766667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws9529__5178\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"52.171.56.101\",\r\n \"possibleInboundIpAddresses\": \"52.171.56.101\",\r\n \"outboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98\",\r\n \"possibleOutboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98,13.84.44.203,13.84.41.82\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-141\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg9410\",\r\n \"defaultHostName\": \"csmws9529-staging.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529/slots?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnOTQxMC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czk1Mjkvc2xvdHM/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "1f3e6c89-e452-4c98-a459-5b2f864f230b" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:16:19 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD7AF2500B\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "d4f40a4b-1f6b-4297-8622-e158ff549767" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11999" - ], - "x-ms-correlation-request-id": [ - "74c9a88f-aba0-4910-8ef3-225a47790755" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091620Z:74c9a88f-aba0-4910-8ef3-225a47790755" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3221" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/sites/csmws9529/slots/staging\",\r\n \"name\": \"csmws9529/staging\",\r\n \"type\": \"Microsoft.Web/sites/slots\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws9529(staging)\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws9529-staging.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg9410-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-141.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg9410-SouthCentralUSwebspace/sites/csmws9529\",\r\n \"repositorySiteName\": \"csmws9529\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws9529-staging.azurewebsites.net\",\r\n \"csmws9529-staging.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": \"Limited\",\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws9529-staging.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws9529-staging.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": \"Dedicated\",\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg9410/providers/Microsoft.Web/serverfarms/cswhp1148\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:16:03.2966667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws9529__5178\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"52.171.56.101\",\r\n \"possibleInboundIpAddresses\": \"52.171.56.101\",\r\n \"outboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98\",\r\n \"possibleOutboundIpAddresses\": \"52.171.56.101,13.84.163.72,13.84.43.80,13.84.45.163,13.84.45.98,13.84.44.203,13.84.41.82\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-141\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg9410\",\r\n \"defaultHostName\": \"csmws9529-staging.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndVerifyGetOnAWebsiteSlot": [ - "csmws9529", - "csmrg9410", - "cswhp1148" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file diff --git a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyListOfSlots.json b/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyListOfSlots.json deleted file mode 100644 index b313dc924cf5..000000000000 --- a/sdk/websites/Microsoft.Azure.Management.WebSites/tests/SessionRecords/WebSiteSlotScenarioTests/CreateAndVerifyListOfSlots.json +++ /dev/null @@ -1,443 +0,0 @@ -{ - "Entries": [ - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Byb3ZpZGVycy9NaWNyb3NvZnQuV2ViP2FwaS12ZXJzaW9uPTIwMTUtMTEtMDE=", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "b3c8d0a5-dc16-41d5-80c7-80fdb181f50c" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:16:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11995" - ], - "x-ms-request-id": [ - "1ffba992-4dd9-42b7-958b-2b4222abced4" - ], - "x-ms-correlation-request-id": [ - "1ffba992-4dd9-42b7-958b-2b4222abced4" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091628Z:1ffba992-4dd9-42b7-958b-2b4222abced4" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "36191" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/providers/Microsoft.Web\",\r\n \"namespace\": \"Microsoft.Web\",\r\n \"authorization\": {\r\n \"applicationId\": \"abfa0a7c-a6b6-4736-8310-5855508787cd\",\r\n \"roleDefinitionId\": \"f47ed98b-b063-4a5b-9e10-4b9b44fa7735\"\r\n },\r\n \"resourceTypes\": [\r\n {\r\n \"resourceType\": \"publishingUsers\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostnameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"validate\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"isusernameavailable\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sourceControls\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"availableStacks\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"staticSites\",\r\n \"locations\": [\r\n \"West US 2\",\r\n \"Central US\",\r\n \"East US 2\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"listSitesAssignedToHostName\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/getNetworkPolicies\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"France Central\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operations\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/operationResults\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"West US 2\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"West US\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Central US\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"North Central US\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-12-01-preview\",\r\n \"2019-08-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/networkConfig\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/hostNameBindings\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"operations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"certificates\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"serverFarms\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"sites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"sites/slots\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove, SystemAssignedResourceIdentity\"\r\n },\r\n {\r\n \"resourceType\": \"runtimes\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"recommendations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"resourceHealthMetadata\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"georegions\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/premieraddons\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East US 2\",\r\n \"East US\",\r\n \"UK South\",\r\n \"Southeast Asia\",\r\n \"North Europe\",\r\n \"Japan East\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"West India\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"None\"\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/multiRolePools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"hostingEnvironments/workerPools\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"kubeEnvironments\",\r\n \"locations\": [\r\n \"North Central US (Stage)\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2019-02-01\",\r\n \"2019-01-01\",\r\n \"2018-11-01\",\r\n \"2018-08-01\",\r\n \"2018-05-01-preview\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"deploymentLocations\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deletedSites\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"ishostingenvironmentnameavailable\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/deleteVirtualNetworkOrSubnets\",\r\n \"locations\": [\r\n \"South Central US\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"Central US (Stage)\",\r\n \"South Africa North\",\r\n \"Australia East\",\r\n \"Brazil South\",\r\n \"Southeast Asia\",\r\n \"Japan West\",\r\n \"Central India\",\r\n \"UK South\",\r\n \"Canada East\",\r\n \"Korea Central\",\r\n \"France Central\",\r\n \"North Europe\",\r\n \"East US\",\r\n \"West India\",\r\n \"East US 2\",\r\n \"Australia Central\",\r\n \"Germany West Central\",\r\n \"Norway East\",\r\n \"Switzerland North\",\r\n \"UK West\",\r\n \"Australia Southeast\",\r\n \"Korea South\",\r\n \"Canada Central\",\r\n \"West Europe\",\r\n \"South India\",\r\n \"West Central US\",\r\n \"East Asia (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"East Asia\",\r\n \"Japan East\",\r\n \"West US\",\r\n \"Central US\",\r\n \"West US 2\",\r\n \"North Central US\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-11-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connections\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"customApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations\",\r\n \"locations\": [],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/listWsdlInterfaces\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/extractApiDefinitionFromWsdl\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/managedApis\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/runtimes\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"locations/apiOperations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-07-01-preview\",\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"connectionGateways\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ],\r\n \"capabilities\": \"CrossResourceGroupResourceMove, CrossSubscriptionResourceMove\"\r\n },\r\n {\r\n \"resourceType\": \"locations/connectionGatewayInstallations\",\r\n \"locations\": [\r\n \"North Central US\",\r\n \"Central US\",\r\n \"South Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"East Asia\",\r\n \"Southeast Asia\",\r\n \"West US\",\r\n \"East US\",\r\n \"East US 2\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"South India\",\r\n \"Central India\",\r\n \"West India\",\r\n \"West US 2\",\r\n \"West Central US\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"UK South\",\r\n \"UK West\",\r\n \"France Central\",\r\n \"France South\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"South Africa West\",\r\n \"South Africa North\",\r\n \"UAE Central\"\r\n ],\r\n \"apiVersions\": [\r\n \"2018-03-01-preview\",\r\n \"2016-06-01\",\r\n \"2015-08-01-preview\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"checkNameAvailability\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"billingMeters\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"verifyHostingEnvironmentVnet\",\r\n \"locations\": [\r\n \"Central US\",\r\n \"North Europe\",\r\n \"West Europe\",\r\n \"Southeast Asia\",\r\n \"Korea Central\",\r\n \"Korea South\",\r\n \"West US\",\r\n \"East US\",\r\n \"Japan West\",\r\n \"Japan East\",\r\n \"East Asia\",\r\n \"East US 2\",\r\n \"North Central US\",\r\n \"South Central US\",\r\n \"Brazil South\",\r\n \"Australia East\",\r\n \"Australia Southeast\",\r\n \"West India\",\r\n \"Central India\",\r\n \"South India\",\r\n \"Canada Central\",\r\n \"Canada East\",\r\n \"West Central US\",\r\n \"UK West\",\r\n \"UK South\",\r\n \"West US 2\",\r\n \"MSFT West US\",\r\n \"MSFT East US\",\r\n \"MSFT East Asia\",\r\n \"MSFT North Europe\",\r\n \"East US 2 (Stage)\",\r\n \"East Asia (Stage)\",\r\n \"Central US (Stage)\",\r\n \"North Central US (Stage)\",\r\n \"France Central\",\r\n \"South Africa North\",\r\n \"Australia Central\",\r\n \"Switzerland North\",\r\n \"Germany West Central\",\r\n \"Norway East\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"serverFarms/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-03-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01-preview\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n },\r\n {\r\n \"resourceType\": \"sites/slots/eventGridFilters\",\r\n \"locations\": [\r\n \"South India\"\r\n ],\r\n \"apiVersions\": [\r\n \"2019-08-01\",\r\n \"2018-11-01\",\r\n \"2018-02-01\",\r\n \"2017-08-01\",\r\n \"2016-09-01\",\r\n \"2016-08-01\",\r\n \"2016-03-01\",\r\n \"2015-11-01\",\r\n \"2015-08-01\",\r\n \"2015-07-01\",\r\n \"2015-06-01\",\r\n \"2015-05-01\",\r\n \"2015-04-01\",\r\n \"2015-02-01\",\r\n \"2015-01-01\",\r\n \"2014-11-01\",\r\n \"2014-06-01\",\r\n \"2014-04-01-preview\",\r\n \"2014-04-01\"\r\n ]\r\n }\r\n ],\r\n \"registrationState\": \"Registered\"\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg7258?api-version=2015-11-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlZ3JvdXBzL2NzbXJnNzI1OD9hcGktdmVyc2lvbj0yMDE1LTExLTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "13cf49b2-fcf5-4855-aed7-763b9da3aa7e" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.Resources.ResourceManagementClient/1.0.0.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "38" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:16:33 GMT" - ], - "Pragma": [ - "no-cache" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1195" - ], - "x-ms-request-id": [ - "eb4cedee-f743-44a4-b070-c6d5ddbe23da" - ], - "x-ms-correlation-request-id": [ - "eb4cedee-f743-44a4-b070-c6d5ddbe23da" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091633Z:eb4cedee-f743-44a4-b070-c6d5ddbe23da" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "179" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258\",\r\n \"name\": \"csmrg7258\",\r\n \"location\": \"southcentralus\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\"\r\n }\r\n}", - "StatusCode": 201 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzI1OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zZXJ2ZXJmYXJtcy9jc213aHA5MDI3P2FwaS12ZXJzaW9uPTIwMTktMDgtMDE=", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"capacity\": 1\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "52b8f173-3efa-42af-9337-e3dd216b0c82" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "119" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:16:47 GMT" - ], - "Pragma": [ - "no-cache" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "f1704dfa-95d0-4742-8794-e0020fde1b19" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-writes": [ - "1198" - ], - "x-ms-correlation-request-id": [ - "212e262d-9f04-4610-bcb5-56187aab08a5" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091647Z:212e262d-9f04-4610-bcb5-56187aab08a5" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "1314" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\",\r\n \"name\": \"csmwhp9027\",\r\n \"type\": \"Microsoft.Web/serverfarms\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"serverFarmId\": 21104,\r\n \"name\": \"csmwhp9027\",\r\n \"workerSize\": \"Default\",\r\n \"workerSizeId\": 0,\r\n \"workerTierName\": null,\r\n \"numberOfWorkers\": 1,\r\n \"currentWorkerSize\": \"Default\",\r\n \"currentWorkerSizeId\": 0,\r\n \"currentNumberOfWorkers\": 1,\r\n \"status\": \"Ready\",\r\n \"webSpace\": \"csmrg7258-SouthCentralUSwebspace\",\r\n \"subscription\": \"04b0639d-85d8-445a-bada-8da78e50ff30\",\r\n \"adminSiteName\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"maximumNumberOfWorkers\": 10,\r\n \"planName\": \"VirtualDedicatedPlan\",\r\n \"adminRuntimeSiteName\": null,\r\n \"computeMode\": \"Dedicated\",\r\n \"siteMode\": null,\r\n \"geoRegion\": \"South Central US\",\r\n \"perSiteScaling\": false,\r\n \"maximumElasticWorkerCount\": 1,\r\n \"numberOfSites\": 0,\r\n \"hostingEnvironmentId\": null,\r\n \"isSpot\": false,\r\n \"spotExpirationTime\": null,\r\n \"freeOfferExpirationTime\": null,\r\n \"tags\": null,\r\n \"kind\": \"app\",\r\n \"resourceGroup\": \"csmrg7258\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"mdmId\": \"waws-prod-sn1-113_21104\",\r\n \"targetWorkerCount\": 0,\r\n \"targetWorkerSizeId\": 0,\r\n \"provisioningState\": \"Succeeded\",\r\n \"webSiteId\": null,\r\n \"existingServerFarmIds\": null\r\n },\r\n \"sku\": {\r\n \"name\": \"S1\",\r\n \"tier\": \"Standard\",\r\n \"size\": \"S1\",\r\n \"family\": \"S\",\r\n \"capacity\": 1\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzI1OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQzODg/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "4ab0f18c-fd5e-45e8-bd4b-ddb273a8764a" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "210" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:17:08 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD97CE1C15\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "7415a4ca-428c-4daa-9927-beecb25961e7" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "8afd9836-b3cc-442a-9a76-ae37a6b9991d" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091708Z:8afd9836-b3cc-442a-9a76-ae37a6b9991d" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3054" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388\",\r\n \"name\": \"csmws4388\",\r\n \"type\": \"Microsoft.Web/sites\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws4388\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws4388.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg7258-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-113.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg7258-SouthCentralUSwebspace/sites/csmws4388\",\r\n \"repositorySiteName\": \"csmws4388\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws4388.azurewebsites.net\",\r\n \"csmws4388.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws4388.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws4388.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:16:51.6566667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws4388\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.85.20.144\",\r\n \"possibleInboundIpAddresses\": \"13.85.20.144\",\r\n \"outboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"possibleOutboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-113\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg7258\",\r\n \"defaultHostName\": \"csmws4388.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388/slots/staging?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzI1OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQzODgvc2xvdHMvc3RhZ2luZz9hcGktdmVyc2lvbj0yMDE5LTA4LTAx", - "RequestMethod": "PUT", - "RequestBody": "{\r\n \"properties\": {\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourcegroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\"\r\n },\r\n \"location\": \"South Central US\"\r\n}", - "RequestHeaders": { - "x-ms-client-request-id": [ - "03cc255d-7220-466a-b2ae-bd5e93867f43" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ], - "Content-Type": [ - "application/json; charset=utf-8" - ], - "Content-Length": [ - "210" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:17:28 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BD97CE1C15\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "46bdc43c-8095-4b68-a8c7-2ab060875b64" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-resource-requests": [ - "499" - ], - "x-ms-correlation-request-id": [ - "3ef67771-b5e8-422c-85f5-9e90a3c38031" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091728Z:3ef67771-b5e8-422c-85f5-9e90a3c38031" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3145" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388/slots/staging\",\r\n \"name\": \"csmws4388/staging\",\r\n \"type\": \"Microsoft.Web/sites/slots\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws4388(staging)\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws4388-staging.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg7258-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-113.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg7258-SouthCentralUSwebspace/sites/csmws4388\",\r\n \"repositorySiteName\": \"csmws4388\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws4388-staging.azurewebsites.net\",\r\n \"csmws4388-staging.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": null,\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws4388-staging.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws4388-staging.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": null,\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:17:12.2766667\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws4388__695f\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.85.20.144\",\r\n \"possibleInboundIpAddresses\": \"13.85.20.144\",\r\n \"outboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"possibleOutboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-113\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg7258\",\r\n \"defaultHostName\": \"csmws4388-staging.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n}", - "StatusCode": 200 - }, - { - "RequestUri": "/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388/slots?api-version=2019-08-01", - "EncodedRequestUri": "L3N1YnNjcmlwdGlvbnMvMDRiMDYzOWQtODVkOC00NDVhLWJhZGEtOGRhNzhlNTBmZjMwL3Jlc291cmNlR3JvdXBzL2NzbXJnNzI1OC9wcm92aWRlcnMvTWljcm9zb2Z0LldlYi9zaXRlcy9jc213czQzODgvc2xvdHM/YXBpLXZlcnNpb249MjAxOS0wOC0wMQ==", - "RequestMethod": "GET", - "RequestBody": "", - "RequestHeaders": { - "x-ms-client-request-id": [ - "008dfa81-d1bf-4365-9664-746ccd076ab6" - ], - "accept-language": [ - "en-US" - ], - "User-Agent": [ - "FxVersion/4.6.26614.01", - "OSName/Windows", - "OSVersion/Microsoft.Windows.10.0.18363.", - "Microsoft.Azure.Management.WebSites.WebSiteManagementClient/2.2.0" - ] - }, - "ResponseHeaders": { - "Cache-Control": [ - "no-cache" - ], - "Date": [ - "Tue, 21 Apr 2020 09:17:29 GMT" - ], - "Pragma": [ - "no-cache" - ], - "ETag": [ - "\"1D617BDA499A9C0\"" - ], - "Server": [ - "Microsoft-IIS/10.0" - ], - "Strict-Transport-Security": [ - "max-age=31536000; includeSubDomains" - ], - "x-ms-request-id": [ - "1429e10f-de4e-4c24-9db4-2bcf6d92c1d4" - ], - "X-AspNet-Version": [ - "4.0.30319" - ], - "X-Powered-By": [ - "ASP.NET" - ], - "x-ms-ratelimit-remaining-subscription-reads": [ - "11997" - ], - "x-ms-correlation-request-id": [ - "c7d786ea-0d6d-4a2b-9ffb-0d5d166bd68b" - ], - "x-ms-routing-request-id": [ - "WESTINDIA:20200421T091729Z:c7d786ea-0d6d-4a2b-9ffb-0d5d166bd68b" - ], - "X-Content-Type-Options": [ - "nosniff" - ], - "Content-Length": [ - "3190" - ], - "Content-Type": [ - "application/json" - ], - "Expires": [ - "-1" - ] - }, - "ResponseBody": "{\r\n \"value\": [\r\n {\r\n \"id\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/sites/csmws4388/slots/staging\",\r\n \"name\": \"csmws4388/staging\",\r\n \"type\": \"Microsoft.Web/sites/slots\",\r\n \"kind\": \"app\",\r\n \"location\": \"South Central US\",\r\n \"properties\": {\r\n \"name\": \"csmws4388(staging)\",\r\n \"state\": \"Running\",\r\n \"hostNames\": [\r\n \"csmws4388-staging.azurewebsites.net\"\r\n ],\r\n \"webSpace\": \"csmrg7258-SouthCentralUSwebspace\",\r\n \"selfLink\": \"https://waws-prod-sn1-113.api.azurewebsites.windows.net:454/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/webspaces/csmrg7258-SouthCentralUSwebspace/sites/csmws4388\",\r\n \"repositorySiteName\": \"csmws4388\",\r\n \"owner\": null,\r\n \"usageState\": \"Normal\",\r\n \"enabled\": true,\r\n \"adminEnabled\": true,\r\n \"enabledHostNames\": [\r\n \"csmws4388-staging.azurewebsites.net\",\r\n \"csmws4388-staging.scm.azurewebsites.net\"\r\n ],\r\n \"siteProperties\": {\r\n \"metadata\": null,\r\n \"properties\": [\r\n {\r\n \"name\": \"LinuxFxVersion\",\r\n \"value\": \"\"\r\n },\r\n {\r\n \"name\": \"WindowsFxVersion\",\r\n \"value\": null\r\n }\r\n ],\r\n \"appSettings\": null\r\n },\r\n \"availabilityState\": \"Normal\",\r\n \"sslCertificates\": null,\r\n \"csrs\": [],\r\n \"cers\": null,\r\n \"siteMode\": \"Limited\",\r\n \"hostNameSslStates\": [\r\n {\r\n \"name\": \"csmws4388-staging.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Standard\"\r\n },\r\n {\r\n \"name\": \"csmws4388-staging.scm.azurewebsites.net\",\r\n \"sslState\": \"Disabled\",\r\n \"ipBasedSslResult\": null,\r\n \"virtualIP\": null,\r\n \"thumbprint\": null,\r\n \"toUpdate\": null,\r\n \"toUpdateIpBasedSsl\": null,\r\n \"ipBasedSslState\": \"NotConfigured\",\r\n \"hostType\": \"Repository\"\r\n }\r\n ],\r\n \"computeMode\": \"Dedicated\",\r\n \"serverFarm\": null,\r\n \"serverFarmId\": \"/subscriptions/04b0639d-85d8-445a-bada-8da78e50ff30/resourceGroups/csmrg7258/providers/Microsoft.Web/serverfarms/csmwhp9027\",\r\n \"reserved\": false,\r\n \"isXenon\": false,\r\n \"hyperV\": false,\r\n \"lastModifiedTimeUtc\": \"2020-04-21T09:17:13.18\",\r\n \"storageRecoveryDefaultState\": \"Running\",\r\n \"contentAvailabilityState\": \"Normal\",\r\n \"runtimeAvailabilityState\": \"Normal\",\r\n \"siteConfig\": null,\r\n \"deploymentId\": \"csmws4388__695f\",\r\n \"trafficManagerHostNames\": null,\r\n \"sku\": \"Standard\",\r\n \"scmSiteAlsoStopped\": false,\r\n \"targetSwapSlot\": null,\r\n \"hostingEnvironment\": null,\r\n \"hostingEnvironmentProfile\": null,\r\n \"clientAffinityEnabled\": true,\r\n \"clientCertEnabled\": false,\r\n \"clientCertExclusionPaths\": null,\r\n \"hostNamesDisabled\": false,\r\n \"domainVerificationIdentifiers\": null,\r\n \"customDomainVerificationId\": \"C3E7C05FE8A97695B3AE08C1935F4251C48E338FE439627B2E788D9D718C8A70\",\r\n \"kind\": \"app\",\r\n \"inboundIpAddress\": \"13.85.20.144\",\r\n \"possibleInboundIpAddresses\": \"13.85.20.144\",\r\n \"outboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"possibleOutboundIpAddresses\": \"13.85.20.144,13.85.23.148,13.85.22.206,13.85.23.243,13.85.17.60\",\r\n \"containerSize\": 0,\r\n \"dailyMemoryTimeQuota\": 0,\r\n \"suspendedTill\": null,\r\n \"siteDisabledReason\": 0,\r\n \"functionExecutionUnitsCache\": null,\r\n \"maxNumberOfWorkers\": null,\r\n \"homeStamp\": \"waws-prod-sn1-113\",\r\n \"cloningInfo\": null,\r\n \"hostingEnvironmentId\": null,\r\n \"tags\": null,\r\n \"resourceGroup\": \"csmrg7258\",\r\n \"defaultHostName\": \"csmws4388-staging.azurewebsites.net\",\r\n \"slotSwapStatus\": null,\r\n \"httpsOnly\": false,\r\n \"redundancyMode\": \"None\",\r\n \"inProgressOperationId\": null,\r\n \"geoDistributions\": null,\r\n \"privateEndpointConnections\": null,\r\n \"buildVersion\": null,\r\n \"targetBuildVersion\": null\r\n }\r\n }\r\n ],\r\n \"nextLink\": null,\r\n \"id\": null\r\n}", - "StatusCode": 200 - } - ], - "Names": { - "CreateAndVerifyListOfSlots": [ - "csmws4388", - "csmrg7258", - "csmwhp9027" - ] - }, - "Variables": { - "SubscriptionId": "04b0639d-85d8-445a-bada-8da78e50ff30" - } -} \ No newline at end of file